[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Should ":" be an extended alphabetic character?
I don't think the issue here is porting code from one language to
another, but rather to have implementations of both languages coexist
in a single Lisp environment, so that procedures written in one or the
other are mutually "callable".
I suspect the problem arises when Scheme symbols reside in a Common
Lisp package (called scheme ?) which is part of the startup set of
packages. Then Scheme code would have a hard time referencing
variables (or invoking procedures) whose names belong to packages
which are not in the "current" inheritance chain. CL code would also
have a hard time referencing Scheme variables (or invoking Scheme
procedures) whose name had a ':' character. Note that the
interpretation of ':' at read time is not really an issue, since the
reader could be conditionalized according to the language being read.
If the above is a correct statement of the problem, there are two
possibilities:
1) Remove ':' from Scheme. The Scheme reader could then treat ':' the
same way as the CL reader, and intern the symbol in the right place.
What it would do with the function/value distinction in that package
is quite a different matter.
2) Add some non-standard reader-syntax which allows mutual references.
For example, assuming that #: is not a predefined reader macro in CL
(there are so many, I don't know which mean anything and which do not),
#:foo in CL would specify scheme:foo, and #:foo:bar in CL would be the
symbol in the scheme package whose print name is foo:bar. Similarly
#:foo in Scheme would represent the CL symbol foo (in user ?), while
#:foo:bar in Scheme would be the way to type the CL symbol bar in
package foo.
Although I like to use ':' in my identifiers, I really don't care much
either way. I'm just worried about gratuituous compatibilities with
CL caused by features of CL which I consider distasteful.