Case sensitivity (was Conjugate is weird)



--- James Amundson <amundson@fnal.gov> wrote:
> I just (privately) told Stavros that I was putting off restarting
> this conversation until later. It looks like the conversation has 
> started anyway.

Figures :-).
 
> Changing the case-sensitivity properties of Maxima is going to be a
> big deal. It deserves a separate release. (The case of the source
code
> itself is probably a separate issue. I hope putting the two together
> does not conflate the two issues more than necessary.)

My guess would be that dealing with both together is virtually the only
way to do it.  Changing source code case might very well highlight
issues related to case-sensitivity

> -- I am taking as given that Maxima's current method for dealing with
> the case of symbols is not satisfactory (an understatement if there
> ever was one.)

Indeed.  I whole-heartedly agree.

> -- I would like to explain my own reasoning about this issue:
> 	1) Maxima is a program for representing mathematics. Although
> notational conventions vary, I have never seen anyone consistently
> use case-insensitive notation. To the contrary, people often have to 
> deal with expressions like
> 	X-x
> or
> 	P = (p,0,0,-p)
> Of course, non-ascii symbols are also common in mathematics. Case is
> only one of many problems in representing mathematics in Maxima.

I know in science upper case K and lower case k often mean different
things.  It would be handy to be able to preserve this meaning.

> 	2) Maxima is a programming language. Most modern programming
> languages are case sensitive, although there are many exceptions. 
> Common Lisp, of course, is a notable exception. Sadly, Common Lisp's 
> convention for dealing with case is overly general, overly
complicated 
> and not very useful in a way that only a standards committee could 
> produce. Most *users* of Maxima are not experts in Common Lisp.

That comment on the CL convention should go on a paperweight for
people's desks :-).  Perfect.

> 	3) Maxima is only one of many computer algebra systems. Most (?) 
> of the competitors are case sensitive. Mathematica is the most
obvious
> example.
> 	
> 	4) In days of yore, I taught physics undergraduates to use
> Mathematica.
> (Yes, it's true.) The number one problem they had was remembering to
> type Sin[x] instead of sin(x). I had that problem when I first
> started to use Mathematica, too.

Yes.  That was also one of the most significant problems I had in my
undergrad physics lab TA job.

> 	5) Most existing Maxima/Macsyma code relies on some level of 
> case insensitivity.
> 
> -- In my opinion, we should
> 	a) Make Maxima totally case sensitive.
> 	b) Make the Maxima built-in functions lower case.
> Point 1) is the most important aspect of my reasoning. I think we can
> deal with 5) -- we are making this change for a better future.

I agree.

> It looks like my opinion is compatible with Richard's opinion. I
> think his spelling corrector suggestion could be a reasonable way to 
> ease the transition.

An error suggestion mechanism would be a very very good thing.  Not
only for the very useful Diff vs diff type of error catching, but it
might also have a benefit whereby if we see the same question about a
wrong input form being asked a lot, we could add a new error message to
display when the case pops up.  As a trivial example, if someone types:

integrate(sin(x));

maxima currently says

Wrong number of arguments to INTEGRATE

which is true, but not as informative as perhaps it could be.  It might
say instead, for example:

Error:  Need to provide integration variable, e.g. integrate(sin(x),x);

More generally, if a nice friendly explanation isn't available, we
might at least have it say something about how many arguments are
expected.  Of course in practice this is limited, since there is no way
to know in general what a user might be up to with most commands, but
for some of the most common mistakes we might be able to help Maxima
help the user.

CY

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