Hacker News new | ask | show | jobs
by adrianN 39 days ago
Template meta programming is essential to many kinds of efficiency that are quite tedious to mimic in C.
1 comments

Aren't C++ templates the desktop version of macros?

Unless I am mistaken macros have been around for ages and are available in many many languages.

For all the shortcomings of C++ templates, they are vastly preferable to preprocessor macros. At least they allow for a modicum of type safety.