Hacker News new | ask | show | jobs
by informatimago 1420 days ago
Or elpp: https://github.com/informatimago/elpp/blob/master/elpp.el
1 comments

I think this is doing something more sophisticated since it seems to understand C syntax. I don’t think it’s hygienic though which is a shame.
hygienic macros are a fun intellectual curiosity but using regular macros with gensym as needed is more practical
Oh man I couldn't disagree more. Having used Nim's hygienic templates, I strongly believe the escape hatch should be the other way round. Hygienic by default, tag individual identifiers as being 'dirty' to inject them as is into the surrounding scope.

Edit: actually, I realize I don't know whether you meant 'macro' in the C sense or the Lisp sense. I was thinking C

When people say "Lisp macros" they usually mean Common Lisp defmacro-flavored ones. Any problems introduced by lack of hygiene can be papered over with separate variable and function namespaces and gensyms.
Not really because a huge feature of hygiene is accurate symbol provenance for syntax error reporting. syntax-case (syntax-parse for Racket) lets you do anything a Common Lisp like macro system can do but is still hygienic by default.