Package alternate names in Allegro CL 10.0

Packages have names and nicknames. Often, names are longer and more formal while nicknames are shorter. When the system must package-qualify a symbol being printed, it is convenient to use a shorter name to avoid cluttering up the printed output.

This was done in earlier versions of Allegro CL with a variable excl:*print-nickname*. When true, the first nickname in the package-nicknames list would be used for the package qualifier (if a package had no nicknames, the package name was used). Allegro CL allowed the package name to also be a nickname, so packages (like excl) which already had short, convenient names could use them and still have longer other nicknames.

But then it was pointed out that the ANS does not allow a package name to also be a nickname. For a while, we played around with package names and nicknames for our packages so the convenient name would be used when *print-nickname* was true but these workarounds were not at all satisfactory.

Starting in release 10.0, we have abandoned using either the name or the first nickname as the choices and allowed every package to have an alternate name set when the package is created. If no alternate name is specified at that time, the alternate name is the first nickname or the package name if there are no nicknames (so the old behavior can be preserved).

Now, whether the package name or the alternate name is used is determined by the variable *print-alternate-package-name*. When true, the alternate name is used. When nil, the package name is used. This gives much better control over what is printed, allowing users to specify names and nicknames as desired and also to have the most convenient name or nickname used when symbols must be package qualified.

See Package nicknames and alternate names in packages.htm for more information. See Extensions to cl:make-package and cl:defpackage and cl:in-package, both in implementation.htm, for information on specifying an alternate name when defining a package.

Copyright © 2017 Franz Inc., All Rights Reserved | Privacy Statement Twitter Google+