Abstract
Generic programming depends on the decomposition of programs into components which may be developed separately and combined arbitrarily, subject only to well-defined interfaces. Among the interfaces of interest, indeed the most pervasively and unconsciously used, are the fundamental operators common to all C++ built-in types, as extended to user-defined types; e.g., copy constructors, assignment, and equality. We investigate the relations which must hold among these operators to preserve consistency with their semantics for the built-in types and with the expectations of programmers. We can produce an axiomatization of these operators which yields the required consistency with built-in types, matches the intuitive expectations of programmers, and also reflects our underlying mathematical expectations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
J. Demmel, LAPACK: A portable linear algebra library for supercomputers, Proc. of the 1989 IEEE Control Systems Society Workshop on Computer-Aided Control System Design, December 1989.
Aaron Kershenbaum, David R. Musser, and Alexander A. Stepanov, Higher-Order Imperative Programming, Computer Science Technical Report 88-10, Rensselaer Polytechnic Institute, April 1988.
Brian W. Kernighan and John R. Mashey, The Unix Programming Environment, Computer 14(4), 1981, pp. 12–24.
Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language, Prentice-Hall, Englewood Cliffs, NJ, 1978.
David R. Musser and Alexander A. Stepanov, Generic Programming, in P. Gianni, ed., Symbolic and Algebraic Computation: International Symposium ISSAC 1988, Lecture Notes in Computer Science v. 38, Springer-Verlag, Berlin, 1989, pp. 13–25.
Robert W. Scheifler and James Gettys, X Window System, 3rd Ed., Digital Press, 1992.
Alexander Stepanov and Meng Lee, The Standard Template Library, Tech. Report HPL-95-11, HP Laboratories, November 1995.
Bjarne Stroustrup, The C++ Programming Language, 3rd Ed., Addison-Wesley, Reading, MA, 1997.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Dehnert, J.C., Stepanov, A. (2000). Fundamentals of Generic Programming. In: Jazayeri, M., Loos, R.G.K., Musser, D.R. (eds) Generic Programming. Lecture Notes in Computer Science, vol 1766. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-39953-4_1
Download citation
DOI: https://doi.org/10.1007/3-540-39953-4_1
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41090-4
Online ISBN: 978-3-540-39953-7
eBook Packages: Springer Book Archive