Template metaprogramming

/ˈtemplət ˌmetəˈproʊɡræmɪŋ/ noun

Definition

A programming technique where templates are used to generate code at compile time, essentially writing programs that write programs.

Etymology

Combines 'template' (C++ feature from 1990s) with 'metaprogramming' (programs about programs, 1960s). This technique emerged accidentally when C++ developers discovered templates were Turing-complete and could perform computations during compilation.

Kelly Says

C++ templates accidentally became a full programming language that runs during compilation - developers discovered they could write programs that generate other programs, like having a robot that builds other robots based on blueprints you give it!

Related Words

Explore More Words

Get the Word Orb API

Complete word intelligence in one call. Free tier — 50 lookups/day.