4 ms·
Of course! These aren't C "macros"; they're Lisp macros, which is a wholly different, and far more valuable and reliable, proposition. Granted, I'm not sure ho
by aaronem 13y ago
Of course! These aren't C "macros"; they're Lisp macros, which is a wholly different, and far more valuable and reliable, proposition.
Granted, I'm not sure how much I like the idea of a macro system which finds macro instances by string-matching the source it's given. But in a non-homoiconic language, I'm not sure anything else is feasible, and I can easily see how something like this could improve Angular.js's dependency injection, for example.
- taejo 13y agoUnhygienic macros aren't a C-ism: hygiene was an innovation (I think originally in Scheme). Ordinary Common Lisp macros are unhygienic.
- aaronem 13y agoSo are sweet.js macros, or else they wouldn't need to have reimplemented GENSYM. But I get the impression (parent (parent)) had sweet.js macros mixed up with C-style string-replacement "macros", which was what prompted my comment.
- mnemonik 13y agoSweet.js is hygienic but you can choose to be unhygienic if you want. It is the best of both worlds. http://sweetjs.org/#getting_dirty__breaking_hygiene http://sweetjs.org/#getting_dirty__breaking_hygiene