Case sensitivity (was Conjugate is weird)



--- "Felix E. Klee" <felix.klee.maxima@gmx.net> wrote:
> 
> Well, what if a file was written in case sensitive mode and the user
> used  "Foo" and "FOO" to mean different things (from my experience 
> with case sensitive languages this does indeed happen, but "foo", of 
> course, is a stupid example). 

Simple examples usually are :-).  To address this case, what would
happen in a case insensitive environment is Foo would be loaded as
c_foo and FOO would be loaded as c_fc_oc_o, or perhaps some more
intuitive mapping could be found.  In any case, for the purpose of
calculations they would be distinct variables in the case insensitive
environment, which is what matters to Maxima.  The case sensitive
coding "style" Maxima would encourage would be lower case with the
occasional upper case where convenient, so hopefully there wouldn't be
too many cases of c_fc_oc_o.  But the important thing is,
programs/source code/etc would work properly in both environments,
regardless of where they were written.

> Then downcasing will break things. 

Straight FOO->foo downcasing would yes, but that's not what I'm
proposing.  

> And I find it 
> absolutely confusing to have two modes. Just understanding what you
> wrote in your post took quite a while for me. 

That's probably the way I'm writing it - I've got it in my head but it
sorta poped in there and getting out on paper turns out to be harder
than I thought.  Basically the end user would just pick a mode and go -
Maxima would take care of the rest.

> As a Maxima newbie I have the following to say: Please decide on
> either case sensitivity or case insensitivity but not both! I 
> personally prefer case sensitivity. After all, Maxima users 
> (highschool students, etc. included) all have a certain kind of 
> mathematical background and are trained to differentiate between 
> symbols of different case. I don't think that they 
> will have many problems with case sensitivity. They will, however,
> have problems when they want to use e.g. "e" for electron charge and 
> "E" for energy but both refer to the same variable. People on this 
> list have brought up that single letter exception to case
sensitivity, 
> but IMHO such uncommon conventions are confusing, especially to 
> occasional Maxima users.

I'm definitely not liking the idea of exceptions to case insensitivity.
 I propose that we use case sensitive mode by default, but allow case
insensitive people to operate fairly painlessly.

> Now, about that idea to render characters in a front end. This might
> be fancy but not all users will want to use such an interface. And 
> even when using e.g. imaxima in EMACS I don't want to enter 
> "e_capital" to denote a capital "e". That way my expressions would
get 
> far too long. Note that I don't generally reject rendering of special

> characters. For examples I like to enter greek characters and see
them 
> rendered by imaxima. Maybe it would be a good idea to extend the TeX 
> function to support more such characters and maybe constructs such as

> vectors.

This isn't one of my better communication days I see.  In case
sensitive mode (the default) you wouldn't need to type e_capital.  You
just type E.  When someone with a case insensitive session reads your
file, it would THEN be converted to c_e or whatever for them.  Then
when they save the file and send it back to you, your load function
would convert the c_* expressions back into the capital letters. 
Painless conversion. 

Special characters are a bit of a different problem, but can be solved
in essentially the same way - phi, pi, etc. can be rendered as text or
figures according to environment.  I think there is already some of
that in the mactex processing?

> Finally a word about that DWIM feature: Mathematica has a feature
> that points out possible spelling errors. While often this is 
> annoying, it saved me several times from making stupid mistakes. If
it 
> can be turned of I welcome such a feature.

The people who say this is hard to do are correct.  I think though, for
newbie users, what little we can realistically do would be quite
helpful.  There can be a "newbie" variable in a default user init file
included in tarball/exe releases which turns those on, and as soon as
the person feels like ditching the suggestions or for advanced users
who don't need them, delete the line in the init file which turns on
this feature.  How good it will be is another question, but that's what
global settings are good for - those who don't want it can easily turn
it off. 

CY

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com