CL implementation questions
Per Bothner
per@bothner.com
Mon Apr 9 06:25:00 GMT 2012
On 04/08/2012 11:18 PM, Helmut Eller wrote:
> * Charles Turner [2012-04-08 21:41] writes:
>
>> In CL:
>>
>> #|kawa:1|# ((as<pair> '(1 2 3)):getCar)
>> Invalid parameter, was: gnu.lists.PairWithPosition cannot be cast to
>> gnu.mapping.Procedure
>> java.lang.ClassCastException: gnu.lists.PairWithPosition cannot be
>> cast to gnu.mapping.Procedure
>> ...
>> #|kawa:2|# (as<pair> '(1 2 3)):getCar
>> (1 2 3) :getCar
>>
>> I'm struggling to see where the difference is happening. I don't know
>> how to trace the execution since the difference is happening in
>> ModuleExp thread which I don't know how to get a handle on for the
>> debugger.
>>
>> Any ideas?
>
> The difference is probably in the reader: ":foo" in CL syntax is the
> keyword foo. In Kawa/Scheme that's written as "foo:" and x:foo is infix
> syntax for ($lookup$ x (quasiquote foo)). CL doesn't have that infix
> stuff.
Yes. Common Lisp uses colon for a package prefix of a compound symbol,
and it's unclear how that should interact with colon notation or other
short-hands. I suggest using the procedures invoke and invoke-static,
rather
than using colon notation. We might consider some kind of abbreviated
syntax for Common Lisp, but let's not worry about that for now.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Kawa
mailing list