Generic Programming Redesign of Patterns

ion. There should be one procedure for each algorithm. Because algorithms should work for different types, procedures must feature a certain degree of abstraction: they must accept input of various types. Most of the algorithmic entities have to be represented in an abstract way. Efficiency. However, abstraction should not lead to a computational burden, since scientific computing requires efficient implementations. These abstract implementations should be about as fast as implementations dedicated to a particular data type. Design. Still, object-oriented modeling of abstraction typically relies on operation polymorphism, which imposes an efficiency penalty due to the huge number of dynamic bindings that usually occur in scientific computing. In particular, design patterns widely use operation polymorphism. Design quality. Yet, the core ideas captured in many design patterns are design structures that have often proved useful in scientific computing. Sacrificing design patterns simply because there might be efficiency problems is not justified.