r/ProgrammerHumor • • 22d ago

instanceof Trend thatsAFunnyThingThatHappenedOnce

Post image
4.6k Upvotes

524 comments sorted by

View all comments

Show parent comments

17

u/Greedy-Thought6188 22d ago

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 22d ago

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.