User-level namespace system for Maxima



>>>>> "Richard" == Richard Fateman <fateman at cs.berkeley.edu> writes:

    Richard> The use of the $name  convention could be entirely replaced by using the
    Richard> common lisp package system.

    Richard> That is, if you have a maxima-user package with nickname mu,  then instead
    Richard> of $sin  you could have mu:sin.

    Richard> This would require changes to the parser, stripdollar, and a few other
    Richard> places. It might be fun to see how few places really have to change.  Maybe
    Richard> it could be done at the same time as allowing strings, instead of strange
    Richard> symbol-names.

I think this is an excellent idea!  

    Richard> If you did this, maybe the rest of the common-lisp package system could be
    Richard> used, with the modification that the package suffix could be changed from
    Richard> the character :  to the character @.

Well, to keep with CL, we'd have to distinguish between : and :: (or @
and @@).  This could be beneficial, too, for maxima.  Then package
writers could decide what functionality to export to users and which
are internal, just like CL.

    Richard> This could, I think,  be changed by a two-line read-table modification.

I'm not sure we can change : to do something else, but it might be
possible to make @ behave like :, in CL.  I'm not very familiar with
read-table modifications, though.

    Richard> (Another example of this would be to replace ((rat) 1 2)  with common lisp
    Richard> rationals.  tracking down all usages of this may be elusive.)

You've done a large part of this, haven't you?  I think it would be
nice to have, as well as supporting CL complexes.  

Ray