This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Splicing lists and vectors into argument lists




On 05/10/2014 12:26 AM, Helmut Eller wrote:
On Fri, May 09 2014, Per Bothner wrote:

The form '@EXPRESSION' (which is reader syntax
for ($splice$ EXPRESSION))

Is there an option analog to --output-format to change the reader syntax
to something stable and standard?

There is a  mechanism for for that.  Kawa has --r5rs --r6rs and --r7rs
command-line options which can tweak the dialect.  Right now these
options doesn't do much - it looks like it only disables colon notation.
There is also a --pedantic option, which currently only affects the XQuery
parser, but can be extended.

This framework can be extended in various ways.

A issue is that initial '@' in a symbol is *not* allowed by R7RS or R6RS.
('@' is a <special subsequent> so is not allowed as an initial character.)
Thus disabling the '@' reader syntax for splice is not appropriate for
a --r7rs flag, which is intended for areas where Kawa conflicts with a
strict reading of R7RS, not disabling extensions.  In this case we're
conflicting with a previous Kawa extension, not any standard.  We could
consider a more generic flag like --compat=VERSION - i.e. --compat=kawa-1.10.
That might promise more than we can deliver, though it can be helpful for
occasional frustrations like this.

Another possibility: If the main problem you're having is with @ as a
single-letter symbol, I could special case a hack for that (e.g. '@'
followed by whitespace or ')' or ']'), emitting a once-per-compilation
deprecation warning.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]