Hacker News new | ask | show | jobs
by gumby 2716 days ago
I discussed this once with Stroustrup. He mourned that the word "macro" had been "polluted" (his word, though I completely agreed) by the preprocessor and said "templates was the best we could do within the constraints of C".

This was in the mid 90s and things are a lot better these days but still, I had better macro support writing Lisp in the 1970s.

1 comments

I am ready to believe that hygienic macros would have been difficult, but just using lisp macros should have been straightforward. Tbh, I think that templates were an adhoc, amateurish design decision.
A lot of the arcanity in templates is the arcane C syntax they are shackled to. I wouldn’t call it ad HPC.

Lisp is so much easier. But current C++ is surprisingly expressive and generates pretty good production code. Instrumenting your Lisp with a lot of type declaration is pretty messy too.