This page is part of the web mail archives of SRFI 46 from before July 7th, 2015. The new archives for SRFI 46 contain all messages, not just those from before July 7th, 2015.
[ I've lost count of how many times I've accidentally sent a mail to one person instead of the list. Grrrr. ]On Sunday, Oct 19, 2003, at 21:10 US/Eastern, Alexpander Petrofsky wrote:
The draft says: No implementation is provided because this is SRFI is merely a request to add two basic features to the SYNTAX-RULES pattern language, and so the implementation of it would be a modification of an implementation of SYNTAX-RULES. I think that's bogus. It's true that RFI stands for "Request For Implementation", but that should be taken as "Request for others to implement in the same way what I have found to work well" rather than "Request for someone to implement my idea that's never been tried, even by me".
Well, it hasn't! (except in your macro transformer, and some hypothetical macros that I've written involving making Andre van Tonder's monadic CPS macros even cooler)
Even though it's impossible to provide a simple implementation that everyone can just drop into their system, I think it's still valuable to have something that at least proves the idea is implementable, and that people can look to for guidance if the English specification is later found to be self-contradictory.
(see two sections below)
One advantage of the original (... ...) idea over choose-your-own-ellipsis is that it is already widely implemented, and you could use the free somewhat-portable syntax-case expander from chez scheme as the reference implementation. If you opt for the more pioneering CYOE concept, then you could perhaps provide a modified version of the chez scheme expander. An advantage of the chez-scheme expander is that it is used by several systems (like SISC and Chicken, IIRC), and patches to it could actually be used by those systems' implementors.
Eek. That would require that I somehow comprehend psyntax. If Scott and Felix can only _barely_ comprehend it, I have grave doubts about _me_ comprehending it...(but I suppose I can try to, and maybe try to comprehend yours as well, although the more I think about it the more I dislike the idea of writing a macro transformer purely for SYNTAX-RULES and _directly_ for SYNTAX-RULES; Scheme48's macro expander, for instance, totals fewer than one thousand lines of code, _including_ comments, and it's a SYNTAX-RULES->explicit renaming transformer _as_well_as_ a macro expander for explicit renaming; unfortunately, the explicit renaming bit uses Scheme48's internal AST stuff, so it's not portable at all, and not many Schemes support explicit renaming)
Another option, more in the "so at least people have something to look at" category, would be to use the macro expander I have been working on occasionally, available at petrofsky.org/src/alexpander.scm, which I just updated to include support for CYOE and tail patterns. (I also added a few pages of commentary, but it doesn't rise to the level of comprehensibility yet.)
I guess I could put a link to your expander in the implementation section. Would that be OK?
I just noticed that the draft only allows one extra pattern after an ellipsis. Don't you want to allow any number, as in Chez scheme? That's the way I implemented it.
Yes, I realized this a few days ago, but I won't change it until I do some more drastic stuff to the document.