[r6rs-discuss] #!fold-case and #!no-fold-case
William D Clinger wrote:
> The draft R6RS abandoned this tradition by making
> #!r6rs into a comment, which either complicates the formal
> grammar(s) or requires special-case hand-coding in get-datum.
Would it be worth having #!r6rs return a value? Perhaps an unspecified
value? Perhaps the symbol whose spelling is #!r6rs? (Note that this
symbol need not be an identifier.)
> Then the non-binding appendix compounded the problem by
> specifying a "region of its effect" for #!fold-case and
> #!no-fold-case that is inconsistent with the region of
> effect for #!r6rs.
I have to wonder if #!fold-case and #!no-fold-case would not be better
replaced by appropriate R5.91RS-like declarations. The scope would be
clearer.
Perhaps more importantly, it would be possible to use get-datum to read
a program written using declarations instead of magic tokens. This is
important; do we really want to abandon the idea that source = data?
We could also preserve readability by making #!fold-case and its friend
evaluate to something. For example, once again, I would suggest the
symbols whose spellings are #!fold-case and #!no-fold-case (which,
again, need not be identifiers). This could be a general rule for
#!<identifier>.
> I don't know quite what to do with #!no-fold-case when
> presented with symbols such as
>
> Pi\x3bb;\x39b;\x3c3;
I think you mean that don't know what to do with #!fold-case when
presented with this symbol.
I suspect that #!fold-case is largely about getting pre-R6RS source to
work in an R6RS implementation. Therefore, I would feel happy if it only
dealt with ASCII symbols that do not contain hex escapes, since
non-ASCII symbols or symbols with hex escapes were non-standard anyway.
(Before anyone beats me up as a language bigot, I write a lot of text
with non-ASCII characters, but it's not Scheme source.)
Regards,
Alan
Received on Tue Jun 26 2007 - 11:57:57 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC