Template

Noun · Development

Definitions

  1. A construct that allows writing code parameterized by types or values, generating specialized versions at compile time. Central to C++ generics and used broadly for reusable components in many languages.

    In plain English: A blueprint for code that works with different types — you write it once, and the compiler creates specific versions for each type you actually use.

    Example: "Write a template so the sorting function works with any comparable type, not just integers."

Related Terms