Comment

Comment by MaxBarraclough

I think I follow, but it seems rather fuzzy. Compile-time functionality doesn't strike me as really extending the language.

How about BOOST_SCOPE_EXIT in C++? [0] Is it extending the language, or just a trivial macro-based hack on RAII? What's the difference?

My other issue with it is that the major features of programming languages that people actually care about, aren't the kinds of things you can implement with clever macros. They tend to rely on serious engineering.

Even in a highly extensible language, you can't easily throw together features like industry-strength garbage collection, or a type system, or borrower-checking. (I considered listing formal verification but that would be unfair, it can't really be added to an existing language.) These things are implemented by compiler engineers, and always will be. (If I'm mistaken about that, and am underestimating anything, I'd be interested to know, but I don't think I am.)

What's the 'killer example' of LISP macros? I can see a pretty neat example at [1].

[0] https://www.boost.org/doc/libs/release/libs/scope_exit/doc/h...

[1] https://docs.racket-lang.org/guide/pattern-macros.html#%28pa...

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton