Whenever possible, reuse high-level code rather than writing
it differently for each context.
``Over'' generalizations can impede
understandability. But cures exist: e.g., provide
partial instantiations.
Focus on type composibility to relate different parameterized
entities.
Common cases:
| Entity | Entity Generator
--------------------------------------------
Object | constructor| type arguments to
| arguments | templates or generics
--------------------------------------------
Service | control | procedure
| arguments | arguments
Can express via conditional compilation and run-time conditions
when you have a finite number of combinations.
Can use generative macros.
Can use late binding and polymorphism.
Can use stand-alone tools that escape limitations of programming
languages. (e.g., cannot define a parameterized construct that
generates templates in C++, so need a tool.)
For full generality, need a meta-circular evaluator (e.g.,LISP)