MethodHandles for Kawa and other functional languages?

Helmut Eller eller.helmut at gmail.com
Thu Sep 30 06:11:50 PDT 2010


* Alessio Stalla [2010-09-30 11:52] writes:

> On Thu, Sep 30, 2010 at 12:48 PM, Helmut Eller  wrote:
>>
>> Just out of curiosity: what do you do if the package was renamed (say
>> from SOME-LISP-PACKAGE to ANOTHER-LISP-PACKAGE) before the bootstrap
>> method gets executed?
>
> It'll fail miserably :D I hadn't thought about that case, thanks for
> pointing it out. The symbol should be available as a static field of
> the caller function, so I should be able to get at it through
> reflection: the name of the invoked method will then be the name of
> that field.

Indeed, that should work.  Very clever.  I'm glad I asked you :-).

I guess you could avoid reflection if you generate a custom bootstrap
method for each callsite.  Hmm.. probably just as clumsy as reflection.

Helmut



More information about the mlvm-dev mailing list