This is the mail archive of the guile@cygnus.com mailing list for the guile project.


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

Re: Case-sensitivity.


I'm coming in a little late here, but I'd like to argue against
case-folding.

The problem is that case-insensitivity is not the same as case-folding.
Currently, Guile only support case-folding -- i.e., the case-insensitive
mode uses a reader that translates 'SyM to 'sym.

This works fine in a Scheme-only world (except for the loss of some
information when symbols are printed).  However, Guile is not meant to exist
in a Scheme-only world.  The user should have available a way to express a
mixed-case symbol or function in order to interact with different language
conventions.  And most languages, except for the Lisps and Basic, are case
sensitive.  Many of them use upper-case letters extensively.  Mixed-case
symbols and functions can be avoided by providing some sorts of wrappers
around the functions before they are exposed to the user, but that's just
more work.  And we all know how important it is to avoid work.

While R?RS tries to match the intuitive notion that 'Soup and 'soup are the
same thing, that doesn't fit with the intuitions of a mixed environment.
The notion that Soup() is actually #{Soup} is neither intuitive nor
attractive.  To trully be intuitive, #{Soup}, 'soup, and 'SouP should all
be equal, with symbols preserving case but eq? ignoring case.  Since I
don't think anyone is proposing this (because it's both inefficient and a
lot of work), I think case-sensitivity is the next best solution.

As long as case-senstivity is the default people will write their Guile code
with this in mind, saving work in the future.  Especially when/if other
languages are supported by Guile.  We shouldn't throw information away by
default.


                                                    -- Ian Bicking