Package initialisation in CL boot

Charles Turner chturne@gmail.com
Thu Jul 12 18:06:00 GMT 2012


On 11 July 2012 22:10, Per Bothner <per@bothner.com> wrote:
> On 07/11/2012 01:57 PM, Charles Turner wrote:
> It doesn't have to.  I think it's ok to require the
> programmer to write:
>   (invoke-static |some.java.ClassName| '|whatEver|)
>
> Note that case-folding must be disabled inside vertical bars.

Hm, OK. That's a lot easier to implement. Thanks.

>> The problem for now is, how to handle something like
>> COMMON-LISP-USER::java.lang.String as a type name. Translator#exp2Type
>> returns an error saying unknown type name because this symbol gets
>> turned into a ReferenceExp by rewrite_car in exp2Type. One way around
>> this would be to unpack the ReferenceExp in exp2Type (in Translator
>> where is checks texp instanceof ReferenceExp) and perform a
>> rewrite(((ReferenceExp) texp).getName()) to get the ClassType when
>> it's appropriate, then wrap that up in a QuoteExp and return it.
>> Doesn't seem "right" though, any ideas on a better approach?
>
> The may work better if you just concentrate on getting
>   COMMON-LISP-USER::|java.lang.String|
> to work.

What do you mean by this? 'CL-USER::|java.lang.String| does what it's
supposed to according to the spec now, but are you saying that the
unpacking of a ReferenceExp in Translator is an acceptable approach?
Since all type names, other than the standard Scheme & CL ones, are
going to be interned into the current package and hence rewritten into
a ReferenceExp. (They all go through the interning process, but the
standard types will be found in the empty namespace, and hence won't
have the prefix, for now at least)

Kind regards,
Charlie.



More information about the Kawa mailing list