generic programming

noun
UK /dʒəˈnɛrɪk ˈprəʊɡræmɪŋ/
US /dʒəˈnɛrɪk ˈproʊɡræmɪŋ/

A way of writing computer code that works for many different types of things without being rewritten.

Using generic programming, the same sorting function can handle lists of numbers, words, or any other type.


OTHER MEANINGS

2. A programming style in which algorithms are written in terms of types to be specified later, so the same code works for many data types.

C++ templates are a well-known form of generic programming.

3. The practice of designing software components that can be adapted to many different situations without modification.

The library's generic programming approach lets developers plug in their own data structures.

4. In a broader sense, writing code that avoids depending on specific details of data representation.

Generic programming helps keep code flexible when data formats change.