[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some questions



In article <860610-162408-2271@Xerox> Miller.pa@Xerox.COM writes:
>
>	Is there a need for flexibility in the mapping from print-names to
>symbols other than to simulate (poorly) flexibility in mapping symbols
>to values?  You are correct that packages buy you scoping of symbols
>themeselves.  My question is: what's this used for other than scoping
>values?

I personally don't see the purpose of packages as being to provide
"flexibility" in mapping symbols to values or to simulate such
flexibility.  If you ignore the kinkier package operations (which
nobody agrees about the right behavior of anyway), then any program
is equivalent to one in which all the package references are
explicit references to internal symbols - as in

	(lisp-setq user-x (lisp-cdr sys-*luser-features*))

Packages are a typing/reading aid, to avoid having to qualify
every symbol in the world, and to avoid the bad old days when
qualification of symbols was haphazard at best.   One should note
that there is *no way* to create an interned symbol that is not
accessible from anywhere.  Locales and lexical environments and
objects are for encapsulation, and therefore support and even
encourage creation of things that are only locally visible.

The "ultimate" Lisp system has a place both for locales and packages,
although it might be a bit complicated...

							stan