On Sunday, June 22, 2014 11:35:25 AM UTC-5, Herwig Hochleitner wrote:
>
> 2014-06-22 9:12 GMT+02:00 Reid McKenzie <rmcke...@gmail.com <javascript:>>
> :
>
>>
>> since there's no other way that we can take a
>> function "as a value" prior to JVM 1.8 which has bytecode lambdas and
>> which the reference Clojure implementation doesn't leverage yet if ever.
>>
>
> Java 8 gained no such feature. Lambda expressions are syntax sugar for 
> almost the thing, clojure's fn does: Instantiating an anonymous inner class 
> for an interface with a single arity.
> The only concept that jvm has of a first class function, are the 
> interfaces in java.util.function, as of Java 8
>

I think (but would be happy to be corrected) that Java 8 lambdas *are* 
actually a little different than an anonymous class instantiation. 
Specifically, I believe the lambda is created via an invokeDynamic and 
cached at the call site, whereas the anonymous class instance would be 
constructed every time.

Alex

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to