On Thu, Nov 26, 2009 at 9:29 PM, Tom Davies <[email protected]> wrote:

> On Nov 27, 1:45 am, [email protected] wrote:
> >   - the "invokedynamic" instruction is a must-have for reasonable
> >     implementations of "dynamic" languages, but "functional" languages
> >     will also leverage its power to implement closures far more
> efficiently.
>
> Could you explain more about that, Xavier?
>
>
I think this might be a good time to reference Mark Reinhold's blog post
about closures for Java:

http://blogs.sun.com/mr/entry/closures

I was fortunate enough to hear Mark speak about his ideas for Java closures
at Devoxx, and at the JDK7 BoF asked him about what was in his mind for
implementing them, and whether the implementation would be based around
method handles.

Mark indicated that he hadn't thought much about implementation yet, but
that he didn't think that method handles were the most likely way to
implement closures for the Java langauge.

It may be worth reading Mark's post carefully, as the behaviour he describes
for the closure structure he's describing seems to me to be somewhat
different from the closure behaviour seen in (some?) other languages, and
I'm not sure that the behaviour described for Java closures (Jclosures?)
really covers all use cases for closures present in dynamic languages.

Of course, it's always entirely possible that I missed something vital in
the substance of Mark's comments - so patches to my understanding (as
always) welcome.

Thanks,

Ben

--

You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.


Reply via email to