"cave laqueum!"



2009/3/31 Robert Dodier <robert.dodier at gmail.com>

> 2009/3/31 Stavros Macrakis <macrakis at alum.mit.edu>:
>
> > Maybe, but we should also systematically recommend and document the
> > load("name") form rather than load(name).
>
> Disagreed. I would rather that the argument to load is a
> symbol which represents the package, rather than a string
> which names a file.
>

I wouldn't disagree if we had some coherent semantics around symbols
representing packages, such as ways of naming objects within packages e.g.
packagename.objectname (note that "." would not be ambiguous if packagename
were actually known to be of type 'package'), some sort of story about what
packagename : value means (is it illegal? does it replace the package
meaning with the value, and therefore make the package inaccessible? etc.);
other useful functions on packages (e.g. loaded_p(package),
objects(package), dependencies(package), ...).

As it is, the symbol within load() is used *strictly* for its name, and
Maxima doesn't even know a priori that it is a package name.  Taking
advantage of the fact that symbols evaluate to themselves if they don't
evaluate to something else in this context is ugly and error-prone.  Even if
we remove built-ins whose names conflict with package names, what about user
functions and packages?

Having some functions implicitly quote their arguments and others not is
just a mess.  Yes, it is 'convenient', but it means that doing things like
map(load,<list of package names>) won't work as you would reasonably expect.

             -s