3 ms·
I was in the same boat until I finally read this (chapter 8): http://www.scheme.com/tspl3/ http://www.scheme.com/tspl3/ Scheme may be simple, but scheme macro
by esessoms 17y ago
I was in the same boat until I finally read this (chapter 8):
http://www.scheme.com/tspl3/ http://www.scheme.com/tspl3/
Scheme may be simple, but scheme macros are not. They go way overboard in trying to protect you from yourself. I'm glad to see Arc moving back in the direction of CL macros, which I think makes it a very interesting alternative to Scheme.
- tumult 17y agoMost 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.
- magv 17y ago> 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-scheme-ref/Explicit-Renaming.html http://www.gnu.org/software/mit-scheme/documentation/mit-sch... [2] http://chicken.wiki.br/explicit-renaming-macros http://chicken.wiki.br/explicit-renaming-macros
- tumult 17y agooops, you're right. nice!
- deleted 17y ago[deleted]
- esessoms 17y agoI 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.