Subject: Case-sensitivity goals, policy and implementation
From: Vadim V. Zhytnikov
Date: Mon, 11 Oct 2004 22:32:47 +0300
James Amundson wrote:
>Everyone,
>
>I would like to present a slightly modified plan for case sensitivity in
>Maxima. Even though we have already discussed this subject at great
>length, I believe a little more discussion is warranted. The change in
>case-sensitivity is something we should do only once, so it is important
>that we end up with a plan that will stand the test of time.
>
>First, let me state the goals of the new plan:
>
>1) Maxima should make it as easy as possible to represent mathematical
>expressions used in hand calculations.
>
>2) Maxima's behavior with respect to case should be simple enough to
>easily explain to users familiar with contemporary programming languages
>and consistent with basic software engineering principles.
>
>3) Maxima should continue to interact well with ANSI Common Lisp.
>
>
>
Originally I was inclined wholeheartedly support James' plan
for CS problem in Maxima. But the more I think about
it the less I'm confident that proposed solution is wise
enough in the long run. This is my reasoning:
PRO:
It is convenient not to care how to type various
functions sin or SIN, bessel or BESSEL etc.
This is convenient both for Maxima user and Maxima developer.
In fact this "convenience" is the only reason behind the scheme
I see (am I wrong?).
CONTRA:
Immediately we have a bunch of problems especially for
unsophisticated user:
- why sin and SIN but not Sin or SIn ?
- why sin and SIN but not %e and %E ?
- what on earth are these so special "system" functions ?
- what happen is I occasionally or deliberately
change system functions list manually ?
- all these $foo and $FOO may be confusing and
error prone even internally for Maxima developer.
Are all these complications worth the above convenience?
I'm really not so sure. What is essential difference
between proposed and present CS scheme? Present scheme
is proved to be quite confusing. The proposal is more
rigid and much less confusing but still is not simple
enough. After all, it doesn't meet requirement 2).
Do you know any other modern computer language with
similar mixed CS behavior?
I think that the only future of Maxima is to be useful
for really wide range of users from professional programmers
and researchers to school boys and girls.
I'm inclined to agree with Andrey Grozin than the only
two options which are simple enough to rule out any confusion are
either absolute case sensitivity or absolute case insensitivity.
And I think than case sensitivity is more suitable for Maxima.
Why? Case insensitivity may be good for programmer languages -
in this case long more or less self explanatory names like
"my_super_foo_bar_function" are generally considered as a good style.
But Maxima is not only and maybe even not primarily programmer language -
it is language for mathematical expressions. But traditionally
mathematical notation tends to be concise. It is
useful to have more different variables with short
names - after all it is easier to read and understand
long mathematical expression with short variables.
--
Vadim V. Zhytnikov
<vvzhy@mail.ru>
<vvzhy@netorn.ru>