packages, objection orientation, list of functions (was case sensitivity)
Subject: packages, objection orientation, list of functions (was case sensitivity)
From: Richard Fateman
Date: Sun, 10 Oct 2004 14:52:40 -0700
While we are keeping a list of system functions,
(an index, even) let me suggest we also start a
list of all possible error messages and where
they come from.
Some of the messages come from the underlying
lisp system; whether these can be caught and
made into Maxima messages in some "system independent"
fashion is unclear to me. Certainly it can be done
in ANSI CL, with error handling, but maybe not
in everyone's favorite lisp.
I think that using packages modelled on CL packages
would provide a possible solution; I do not particularly
care for its utility. On the other hand, other models
may be no better. There is a package system
in Mathematica that has undergone some use and perhaps
modification. I do not know its details, but anyone
trying to devise one for Maxima should certainly
look at it.
One could also look into object-oriented coding,
given that packages are attempting to do some of
the same partitioning of information, methods, etc.
RJF
Vadim V. Zhytnikov wrote:
> James Amundson writes:
>
>> 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.
>>
>> (These goals could probably be stated more clearly, but I don't think
>> it's worth spending a week working on wording.)
>>
>> To sum up a long conversation that I do not wish to revisit, the problem
>> with the current implementation is that it fails to meet goal (2). The
>> case-guessing logic in the current Maxima can lead to surprising
>> behavior. One such surprise showed up just this week in seemingly minor
>> additions to the test suite.
>>
>> Originally, I proposed a new policy whereby Maxima would be totally case
>> sensitive. The implementation was to involve extensive use of quoting,
>> e.g., |$integrate|, in the lisp source. As I recall, Raymond Toy's
>> reaction to this was "yuck." Having tried typing ||'s everywhere for a
>> while, I see his point. I now agree that this policy/implementation
>> combination would conflict with goal (3) above.
>>
>> I would like to propose a modified policy. Maxima would be totally case
>> sensitive, *however* all built-in functions would be addressable as
>> either all lower case or all upper case. E.g., the cosine function could
>> be written as "cos" or "COS". "Cos", "coS", "CoS", etc. would all be
>> distinct functions.
>>
>>
>>
> Seems as a reasonable compromise. Just an idea -
> maybe we should keep a list of "system" functions.
>