Skip to content

Files

Latest commit

 

History

History

0.short-story

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Generic Programming: A short (hi)story

What is generic programming?

  • Generic programming is a programming paradigm that focuses on writing code that can work with different data types without being rewritten, promoting flexibility and reusability. It allows developers to create algorithms and data structures that are independent of specific data types, working with any types that satisfy certain concepts, regardless of their specific implementation, making the code more general and adaptable to various situations.
  • "The term generic programming was originally coined by David Musser and Alexander Stepanov (...) to describe a programming paradigm in which fundamental requirements on data types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, with generic functions implemented in terms of these concepts (...)" (Wikipedia, https://en.wikipedia.org/wiki/Generic_programming).
  • "Generic programming centers around the idea of abstracting from concrete, efficient algorithms to obtain generic algorithms that can be combined with different data representations to produce a wide variety of useful software" (Musser, David R., and Alexander A. Stepanov. "Generic programming." International Symposium on Symbolic and Algebraic Computation. Berlin, Heidelberg: Springer Berlin Heidelberg, 1988).
  • Many modern programming languages incorporate generic programming principles, which are needed to achieve both flexibility and efficiency in fields such as high-performance computing, numerical simulations, and machine learning.

Generic programming and mathematics

Generic programming has deep mathematical roots. It was influenced by the formal abstraction techniques in mathematics, where general principles are derived independently of specific cases.

History

  • The University of Göttingen was the most important place in the history of mathematics, producing some of the most influential mathematicians: Gauss, Dirichlet, Riemann, Klein, Hilbert, Noether. Many of their contributions laid the groundwork for modern abstract mathematical thinking, which directly inspired generic programming.
  • The mathematical foundations of generic programming are attributed to Emmy Noether. She is known as the most important woman in the history of mathematics, revolutionizing abstract algebra and mathematical physics. Noether’s work laid the foundation for the principles underlying generic programming and inspired Stepanov’s approach to generic programming in C++.
  • "Emmy Noether’s revolutionary insight was that it is possible to derive results about certain kinds of mathematical entities without knowing anything about the entities themselves. In programming terms, we would say that Noether realized that we could use concepts in our algorithms and data structures, without knowing anything about which specific types would be used." (Alexander A. Stepanov and Daniel E. Rose: From Mathematics to Generic Programming. Addison-Wesley Professional, November 7, 2014).
  • "For Emmy Noether, relationships among numbers, functions, and operations became transparent, amenable to generalization, and productive only after they have been dissociated from any particular objects and have been reduced to general conceptual relationships." (B. L. van der Waerden).