Hacker News new | ask | show | jobs
by tumult 6118 days ago
Most Schemes give you define-macro (and gensym), which is the same as CL macros. Bigloo, Chicken, and some others even have hygienic macros off by default due to the overhead, and recommend that you use define-macro whenever possible.

I usually use a mixture of both. define-macro for when I'm just trying to kill some repetition without an obvious functional composition solution, and define-syntax for when I'm laying serious groundwork functionality.

2 comments

> Bigloo, Chicken, and some others even have hygienic macros off by default due to the overhead, and recommend that you use define-macro whenever possible.

Not anymore for Chicken! Chicken 4.0 switched to `syntax-rules' and explicit renaming macros.

Edit: those who like traditional macros might also like explicit renaming ones [1,2], since they're very similar.

[1] http://www.gnu.org/software/mit-scheme/documentation/mit-sch...

[2] http://chicken.wiki.br/explicit-renaming-macros

oops, you're right. nice!
I honestly can't decide if the news that many scheme implementations encourage you to not follow the standard refutes or supports my point.

Either way, good to know.

...gets back to work hacking in SBCL.