6 ms·
Or elpp: https://github.com/informatimago/elpp/blob/master/elpp.el https://github.com/informatimago/elpp/blob/master/elpp.el
by informatimago 4y ago
Or elpp: https://github.com/informatimago/elpp/blob/master/elpp.el https://github.com/informatimago/elpp/blob/master/elpp.el
- slaymaker1907 4y agoI 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.
- smegsicle 4y agohygienic macros are a fun intellectual curiosity but using regular macros with gensym as needed is more practical
- shirleyquirk 4y agoOh 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
- bitwize 4y agoWhen 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.
- slaymaker1907 4y agoNot 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.