[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should ":" be an extended alphabetic character?
We have experienced little difficulty with Common LISP -> R3RS
code ports, precisely because ":" is an extended alphabetic character.
I advocate leaving it this way.
That is, (cons foo:x (list 3)) is meaningful and well-defined as an
operation on the unique variable named "foo:x" in both Scheme and
Common LISP, for the obvious reasons, and in nearly all cases we've
encountered, it ports cleanly without any additional attention or concern.
The cleanliness of this porting task is a function of the uniqueness of
colon-qualified symbols in Scheme, which in turn is in a sense guaranteed
by the very property of ":" being extended-alphabetic.
We have implemented a macro packages, using our local definition of
"macro", to map just enough of the Common LISP package system's
constructs into Scheme so as to permit CL code to run, without making
it desirable to use this pseudo-package kludge when writing new code.
(In my view, discouraging package use in this manner is an important
design feature of this approach.)
asc
p.s. If you want to worry about ":" and Common LISP code ports, worry
about keywords. The only simple way to get your CL code to work
in Scheme (as far as we've been able to see so far) is to quote
all CL keywords -- which, fortuitously, happens to work, since (1)
':foo = :foo in CL and (2) R3RS doesn't contain (SYM)EVAL. But
it does require either alteration of the CL source or preprocessing
of the source before/during loading into the Scheme environment.