$values and $functions



Robert Dodier <robert.dodier <at> gmail.com> writes:

> 
> On 6/9/09, Richard Fateman <fateman <at> cs.berkeley.edu> wrote:
> 
> > Probably not. I think that we need a "package" system in which the
> > user's own variables are in a separate package from those in a load()
> > package.
> 
> Yeah. In fact there is namespaces.lisp which exposes the Lisp
> package system to Maxima. It seems to work OK.
> Just need to hack all of the add-on packages to make use of it ....
> 
> FWIW
> 
> Robert Dodier
> 

I've had a quick look - looks nice. Probably the most important thing in the
end is, that it's easy to use, so the user can write a package with two lines
at the top of .mac file, for instance:

package("mypackagename");
export_symbols('myfun1, 'myvar1,...);
.. the rest of the package is the same..

>From my perspective (implementing Inspector pane into wxMaxima) it
would be best to have 2 loading functions (arbitrary names):
'import' for package imports
'load' for loading user files
where only 'load' puts symbols into $values and $functions, while
'import' doesn't do that.

I wonder why such extensions remain in 'contrib' - including such packages
(also 'numericalio' and 'stringproc' ...) into src would make Maxima's
language much more 'complete' compared to other 'real' programming
languages. In Maxima, many of the basic features (like i/o with text files)
have to be loaded, but it really should appear as a part of Maxima's
programming language imo.

Regards,
Ziga