Design patterns for generic programming in C
Alexandre Duret-Lutz, Thierry Géraud, Akim Demaille · 2001
Generic programming is a paradigm whose wide adoption by the C community is quite recent. In this scheme most classes and procedures are parameterized, leading to the construction of general and efficient software components. In this paper, we show how some design patterns from Gamma et al. can be adapted to this paradigm. Although these patterns rely highly on dynamic binding, we show that, by intensive use of parametric polymorphism, the method calls in these patterns can be resolved at compile-time. In intensive computations, the generic patterns bring a significant speed-up compared to their classical peers.
Cited by 14 works.
Authors
References
- Design Patterns: Elements of Reusable Object-Oriented Software
- The Unified Modeling Language reference manual
- The Definition of Standard ML
- Generative Programming: Methods, Tools, and Applications
- The Design and Evolution of C
- The Definition of Standard ML (Revised)
- The Standard Template Library
- Generative Programming
- Mixin-based inheritance
- Generic Programming and the STL: Using and Extending the C++ Standard Template Library