I meant the runtime implements them as dynamically generated anonymous
inner-classes currently (hence the lamda$0 naming to match). It's currently
an implementation detail since the bytecode doesn't reflect this (noted in
your link) and the JLS doesn't dictate how lamdas are implemented by the
runtime.

We're way off topic!


On Wed, Mar 5, 2014 at 10:21 PM, Luke Daley <[email protected]>wrote:

>
>
> On 6 March 2014 at 4:13:52 pm, Jake Wharton ([email protected]) wrote:
>
> On Wed, Mar 5, 2014 at 9:34 PM, Cristian C. <[email protected]>
> wrote:
>
>> You can actually use Java 8 on Android. Take a look at the retrolambda
>> project: https://github.com/orfjackal/retrolambda
>>
>
> No, you can't.
>
> What this library does is rewrite the bytecode from instructing the
> runtime to create a lambda (which currently uses anonymous inner-classes as
> an implementation detail) to actually creating anonymous inner-classes
> directly in your code.
>
> Lambdas aren't actually implemented in Java 8 as AICs:
> http://zeroturnaround.com/rebellabs/java-8-the-first-taste-of-lambdas/
>
> They were in very early builds.
>
>
>
>
> It's essentially syntactic sugar that is fixed at the byte-code level
> instead of at the compiler level (which is how the Java 7 "backported"
> features are currently implemented).
>
>
>> I also suggest using IntelliJ instead of Android Studio. It's tricky to
>> configure AS to make it work with Java 8. So far I have tested lambdas,
>> diamons, method references, streams, etc. and they seem to run just fine.
>>
>
> For the JVM it supports them, yes. You cannot use features which are not
> syntactic sugar on Android.
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to