From: Brian Harvey <[email protected]>
Subject: Re: [r6rs-discuss] Proposed features for small Scheme, part 4B: 
case-sensitivity
Date: Tue, 8 Sep 2009 18:48:41 -0700

> > Nothing.  If you mean "What happens at file boundaries?", which is a more
> > plausible question, then I think the answer is "reset to the default".
> 
> I don't think that quite answers the question, which is, if I'm understanding
> correctly, what happens when a module/file/whatever exports two symbols that
> are the same except for case, but are meant to be different identifiers.
> And I think the answer has to be that that's an error; otherwise, it will
> be impossible for a program written by a Lisp traditionalist to use a library
> written by a C/Javaesque whippersnapper. [:-)  <- note smiley]
>
> This can be an error that implementations are not required to catch, as long
> as the people who write canonical libraries follow the rule.
> 
> I don't think there's a problem the other way; non-case-folders won't have
> any trouble using case-folding libraries.

I can live with that "case is preserved, but folded in
comparison" approach 99% of time, but it breaks in rare
edge cases.

For example, what will you suggest a natural interface to
import Xlib?  It defines symbols like XK_A and XK_a,
corresponding user's key input of uppercase and lowercase
'a', respectively.

We can use xk_capital_a and xk_small_a, or xk_\x65; and xk_a,
respectively.  The problem is that there won't be a general
rule applicable automatically, preserving human readability.
For each of such exceptional library somebody has to look
through the exported symbols and decide which ones should
be treated specially.  Users of the library has to look
up the document for such special cases.

What I like in Scheme is that it has limited number of
orthogonal rules that can be combined freely, without
worring about exceptions.  Case-folding symbol comparison
seems to me to bring exceptions into rules.  The fact that
it is very rare makes situations only worse---people are
tempted to make programs that ignore rare cases, which
work 99% of the time but break unexpectedly.

--shiro








_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to