Case-sensitivity goals, policy and implementation



--- Richard Fateman <fateman@cs.berkeley.edu> wrote:

> If I write case-sensitive code in which x and X must mean
> different things, then I am deliberately being non-transportable
> to certain other peoples' domains. This could be considered
> either inconsiderate, or progressive.  I might also use unicode,
> in which there are like a zillion "cases".

In the case of case-sensitive code being mapped to case insensitve
code, I proposed a long time ago (for ASCII at least) that the mapping
could be done like:

A -> cap_a
B -> cap_b

and if cap_* were already defined, a warning could be given and cap_b1
used instead, or cap_b2, etc until all capital letters are mapped to
lower case.

I admit this is quite annoying if the intent is to program the code,
but if the only goal is to run it in a case insensitive environment it
will function.

IIRC this idea recieved even more universal rejection than totally case
sensitive or insensitive, and in retrospect I agree.  I personally feel
that Maxima should go case sensitive, but I agree it should be all one
or the other.  My concern is rather petty - it drives me nuts when I
type %i or %pi and get back %I and %PI.  Not a significant concern, but
it does annoy :-).

I think the reason I would tend to favor case sensitivity is that, to
the eye, case does convey information.  As far as the eye is concerned,
sin != Sin != sIn != SIN.  To another part of the brain they should all
mean the same thing, because it is not obvious what additional
information the case changes are intended to convey, but personally I
would tend to favor putting up with the irritation of sin != SIN, since
my eye agrees with that definition.

One thing I did propose that might be appropriate, simple and useful is
for there to be an option where Maxima treats all upper case ASCII
characters fed to it upon input as lower case.  That way, if someone
types COmmon instead of common, it will still be displayed and read on
the input level as common.  I don't recommend this as a default,
because we'd get a bunch of bug reports about it, but for the people
who really don't like case sensitivity they could enable it and
everyone is happy :-).

CY


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com