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

Package names

I dislike restrictions on what can go into package names. Tradition in Lisp
syntax is to not restrict the language due to the syntax. Restrictions
should not be made on what characters may appear in a package name any
more than they should be made about what can go into a string. Can you
imagine the irritation of being told you can't use NUL in a string because
it's being used for an end of string designator. Having to remember which
N chars can't be used in package names would be very irritating and would
drip too much of yielding to a particular syntax when a strong premise of
Lisp is that syntax is not wired. How about if we say that the tokenizer 
scans the package id just as any symbol (allowing vbars) so that 
|()|:FOO is legal. It will then look up the package (using case insensitive
lookup of (SYMBOL-NAME the-package-symbol-thing-we-just-read)). You can declare
a package using a string so case can be designated at that time. On output,
the exact case of that declared name will be used and a special hack will be
put in the printer such that |...| will be removed from mixed-case things
where they would normally be retained. eg,
 |Abc|:|Abc| would print as Abc:|Abc| (same as ABC:|Abc| and abc:|Abc| and
              a/bc:A/b/c, etc. assuming the package was declared with "Abc" as
              its name).
Are there any problems with such a scheme? I really think it's essential that
we not get cornered into prohibiting certain chars as people seem to be