Re: Unicode lambda Lassi Kortela 14 May 2019 12:35 UTC

Another thing that could be done with #!(...) is to enable syntax SRFIs.
So #!(srfi 234) could enable the syntax extensions from SRFI 234 for the
remainder of the stream. This would be a nice symmetry with R7RS (import
(srfi 234)) forms.

I was just thinking about how underscores in numbers (draft SRFI 169)
could be used in source code without the numbers parsing as symbols when
read by a Scheme that doesn't implement the SRFI. A #!(srfi 169) would
solve this handily. The Scheme would just cause a read error if it
doesn't know how to handle that SRFI. And it would double as a clear
signal to humans reading the source code that syntax extensions are
being used.

I don't know if there should be a mechanism to turn off the syntax
extensions later in the same stream. Can it cause problems for some kind
of extension if it's turned off?

In R7RS there's #!fold-case and #!no-fold-case. Ideas based on that:

     #!(srfi 169 #f)
     #!(srfi #f 169)
     #!(no-srfi 169)

If a syntax SRFI has options that affect syntax, they could be appended:

     #!(srfi 234 original)
     #!(srfi 234 classic)
     #!(srfi 234 straight (chaser #f))