l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver <m...@netris.org> skribis: > >> l...@gnu.org (Ludovic Courtès) writes: >>> My understanding was that the sweet-expressions folks already had >>> something, no? >> >> The implementation they have (which they call a "demo") reimplements the >> entire reader from scratch. There are several problems with this, the >> worst of which is that it strongly discourages anyone from using the >> syntax in code that they'd like to deploy. You can't simply publish a >> module with '#!curly-infix' at the top and have people use it. You have >> to ask them to install the sweet-expressions implementation first, and >> then ask them to somehow arrange for your code to be read using the >> special reader. > > Would it help if it were distributed as part of Guile? That’s something > we could do when the implementation is considered reasonably stable.
That wouldn't work, because #!curly-infix (like any other reader directive) can appear anywhere that comments are permitted, at any depth within an s-expr, and must affect all tokens that follow until the end of the file. Even if we somehow figured out a way around that problem, the other problem is that it would require us to maintain two almost identical readers that implement all of the functionality our reader supports (e.g. arrays, source properties, read-hash-extend, all of our other read options, etc), and keep these two implementations in sync with each other. Regards, Mark