[r6rs-discuss] Case-Sensitivity Optional, Case-Preservation Mandatory
cowan at ccil.org
Mon Feb 23 14:46:15 EST 2009
Erich Rast scripsit:
> I completely agree the two *symbols* should be eq? if the language is
> set to being case-insensitive. But when you convert the symbols to
> strings/unicode, foo has to yield "foo" and FOO has to yield "FOO", the
> two strings not being string=? even when the language is set to being
Ah, I think I see. You want a Scheme in which symbols which differ in
case are identical (in the sense of eq?) but discernible (by calling
symbol->string and string=?). I hereby dub this "Non-Cartesian Scheme",
since Decartes was the first to make heavy use of the indiscernibility
That is not at all what pre-R6RS Schemes do: Foo and foo are spellings
of the same identical and indiscernible symbol. And although Scheme
breaches the identity of indiscernibles (#\A and #\A may or may not be
identical in the sense of eq?, though they are indiscernible otherwise),
it still abides by the indiscernibility of identicals.
> That's pretty much what case preserving means, isn't it?
IMHO no. A case-preserving file system (like, okay, the *Win32 overlay*
on NTFS) does not allow you to have two files differing only in name
that are the same; it isn't even clear what "the same" would mean in
such a context, since files have a lot more attributes than symbols.
John Cowan cowan at ccil.org http://ccil.org/~cowan
Big as a house, much bigger than a house, it looked to [Sam], a grey-clad
moving hill. Fear and wonder, maybe, enlarged him in the hobbit's eyes,
but the Mumak of Harad was indeed a beast of vast bulk, and the like of him
does not walk now in Middle-earth; his kin that live still in latter days are
but memories of his girth and his majesty. --"Of Herbs and Stewed Rabbit"
More information about the r6rs-discuss