CRTP is the Worst Acronym in C++

05.22.2025 — In Programming Languages

People complain about RAII, but at least you can look that acronym up. Sure, "Resource acquisition is initialization" might have the air of a really clever Danish witticism that got a bit mangled by Google Translate. However, compared to Dijkstra, who invented semaphores solely as a psyop to get us to use the words "probeer" and "verhoog," RAII is a-okay. We get the gist! Plus, Bjarne gets to joke about how Bell Labs didn't give him a marketing budget, our bellies jiggle in a collective laugh, and we learn that the real RAII was the friends we made along the way.

CRTP: The JJ Abrams Mystery Box of Acronyms

CRTP, on the other hand, is NO LAUGHING MATTER. It is the JJ Abrams "Mystery Box" of acronyms. The only good thing going for it is that it's non-recursive. That means that, unlike GNU, you can ask Grok 3 in Think Mode to expand the acronym without causing NVIDIA Big Iron sitting in Memphis, Tennessee to get melty while wandering a Stallmanesque funhouse mirror maze for the rest of time.

Grok 3 will speedily tell you CRTP means "Curiously Recurring Template Pattern." Unfortunately, that will leave you with more questions than you started with. We've got "Template" in there, but this is C++—what isn't a template for crying out loud? We've also got this curiously recurring pattern thing going, kinda like how the numbers 4, 8, 15, 16, 23 and 42 kept popping up in Lost.

So you ask follow up questions or you read a Wikipedia article to get the gist. Why was this so hard to figure out? Why is this acronym so terrible?

The Origin Story

Recently, I've been reading the book "C++ Gems," which is a collection of famous C++ Report magazine articles published between 1990 and 1996. This includes James Coplien's article that popularized the term CRTP.

Published shortly after the release of the Gang of Four design patterns book, James detailed a use of templates that seemed unnatural to him and other C++ mavens. Keep in mind that in C++, friendship is defined by whoever gets to touch your private parts, so C++ folks are pretty groovy and unnatural means UNNATURAL.

We're talking seeming incestuous parent-child relationships where a child class has a templated parent that is specialized on itself. We're talking circular dependencies from an "I'm my own Grandpa" time travel accident.

Ick or not, this pattern turned out to be super useful. You should definitely read the article to learn more. However, I'm only here to grouse about acronyms.

How We Got This Terrible Acronym

The first clue about how we got this acronym is Coplien's title: Curiously Recurring Template Patterns. (Note the plural there!)

The body of the article discusses three related instances of C++ developers independently discovering similar template techniques enabling "circular dependencies." Coplien names each example and makes slight comparisons between them in the paper, but he never attempted to offer an overarching name for the pattern.

This was probably a mistake!

I imagine C++ developers later discussed this article by the water cooler, but they got tired of saying "That pattern from the Curiously Recurring Template Patterns article" and they started saying "Curiously Recurring Template Pattern" instead. When the discussions continued over e-mail or bulletin board, this got further abbreviated to CRTP.

Alternatively, C++ devs also may have come up with 10 different names, fought tooth and nail, and found it impossible to achieve consensus on a name better than CRTP. After all, that's basically what happened when the C++ community tried to standardize the file extension for C++ header files!

A Modest Proposal

Perhaps we should just start defining CRTP as Cyclic Relationship Template Pattern? That would at least let us escape the JJ Abrams Mystery Box and get to RAII levels of meaning!

Further Reading

Link to Curiously Recurring Template Patterns by James O. Coplien.

© 2018 by Sean McBride. All rights reserved.
Last build: 15.03.2026