r/ProgrammerHumor • • Oct 17 '26

instanceof Trend thatsAFunnyThingThatHappenedOnce

Post image
4.6k Upvotes

524 comments sorted by

View all comments

Show parent comment

17

u/Greedy-Thought6188 Oct 18 '26

Templates are turing complete. You can basically treat C++ like an interpreted with the compiler being the interpreter. C has macros too.

4

u/4xe1 Oct 18 '26

Rust macros are Turing complete too, intentionally so, that's the whole point of proper macros. "the same programming language" is a bit of a stretch for Rust (but perfectly valid for lisp), but macro's Turing completeness is easier to use than C++'s templates.

C has search and replace pre-processor macros.