Hacker News new | past | comments | ask | show | jobs | submit login

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.




Unhygienic macros aren't a C-ism: hygiene was an innovation (I think originally in Scheme). Ordinary Common Lisp macros are unhygienic.


So 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.


Sweet.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




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: