3 ms·
Plenty of languages give you the option of writing macros, however the difference between writing macros in a lisp and those languages is like the difference be
by medo-bear 3y ago
Plenty of languages give you the option of writing macros, however the difference between writing macros in a lisp and those languages is like the difference between using a general purpose programming language and an accidentally Turing-complete one.
- eru 3y agoC's preprocessor is such an 'accident'. But eg Rust's macros and template Haskell are very deliberately designed.
- medo-bear 3y agoNo. You can say that Common Lisp and Racket are deliberately designed around macros. In Haskell, Rust, C++, they have been bolted on to the language as an after thought. Unless I am mistaken, those languages do not have the ability to write DSLs interactively, unlike Common Lisp.
- eru 3y agoWhat do you mean by 'write DSLs interactively'?