On 4 Apr 2008, at 12:56 pm, Alex Shinn wrote:
There seems to be a lot of confusion in the Chicken community, and the Lisp community in general, about the different macro systems, so I thought provide some background information and discussion of the eggs available in Chicken and their uses.
*applause* Alex, can we put this on the Wiki for prosperity? It's very useful!
On the other hand, if you don't tightly bind one specific destructuring idiom to your macro system, you can take your pick of any external matching or syntax-verifying libraries you want (e.g. use explicit renaming macros with the MATCH macro for destructuring).
Yes! This is my biggest beef with syntax-case. We have match - why not just do things in a way that works with that existing technology, rather than having these funny syntax objects that need their own matching system? Duplication sucks. Syntax-rules is handy for simple stuff, but I'd hate for it to be the only macro system I had - I like to think of it as a shorthand for a reasonably common case, TBH. While grumbling slightly about it having its own destructuring language all over again, and never quite remembering the rules for ellipses, and thus all too often tending to just go and use a define-macro since it's not another egg to depend on and I'd just have to look up the syntax-rules syntax again since, sure enough, last time I avoided using it anyway, so I never really get to properly learn the syntax... ...but I'm just lazy ;-) I think I'm going to bite the bullet and install riaxpander and use er+match for everything, in the hope that if enough momentum builds up around that, it'll become the de-facto standard and there will be no more worries about which macro systems different eggs use and their incompatibilities. What are people's feelings about moving it into the core? I know it's nice to keep it simple, but there's a certain un-simplicity in defining all the core macros with define-macro to just have them redefined in terms of a hygienic macro system as soon as it's loaded, and the chicken macro expander offered up to the garbage collector. And having define-macro as the only macro system supplied out of the box does sort of encourage people to use it when they'd really be better off using something hygienic. ABS -- Alaric Snell-Pym Work: http://www.snell-systems.co.uk/ Play: http://www.snell-pym.org.uk/alaric/ Blog: http://www.snell-pym.org.uk/?author=4 _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
