[r6rs-discuss] Scheme should not be changed to be case sensitive

From: Chris Hanson <cph>
Date: Thu Nov 16 13:52:03 2006

   From: Per Bothner <per_at_bothner.com>
   Date: Wed, 15 Nov 2006 23:54:37 -0800

   Chris Hanson wrote:
> I have two suggestions for a notation. The one I prefer is a
> pair of reader tokens #!fold-case and #!no-fold-case which cause
> the reader to change its interning mode.

   I take it these tokens work like comments or whitespace, but with a
   side-effect of changing the reader state?

Yes, although see below.

   What is the scope if the state change? The current invocation of
   read, or the entire file? The latter would be nicer, and more
   likely to be what people except. However, it means that the
   case-fold state would have to be stored in the input-port, rather
   than the reader.

I think the scope should be the characters coming from the port that
it's read from. If the token is dynamic, then it can be overridden by
a subsequent token; if it's static, subsequent tokens are an error. I
don't have a strong opinion on whether dynamic or static is
preferable, but I will note that a dynamic token is useful in the
context of an interactive port, as it provides a way for the end user
to switch modes. But there are probably other ways to handle this if
static tokens are preferred.
Received on Thu Nov 16 2006 - 13:51:55 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC