Thursday, June 11, 2015

Re: GWT 2.8.0 forEach, Consumer, Function, Streams and other Java 8 stuff

Hi Thomas, thanks for the answer.
You can compile java even 1.2 source code with JDK 1.8, so what is the problem with compiling Java 7 source with GWT for Java 8 emulation? Interfaces also should not be broken because of default methods in interfaces (that can just be ignored in sourceLevel < 8). Can you give example that describes the problem, please?

четвер, 11 червня 2015 р. 16:10:23 UTC+3 користувач Thomas Broyer написав:

On Thursday, June 11, 2015 at 2:58:09 PM UTC+2, Ivan Hetman wrote:
Hi. I used GWT 2.8.0-SNAPSHOT to try it on my projects to reduce boilerplate code. But I was confused when I tried listeners.forEach() and compiler said that there is no such method in Set (i. e. Iterable). Also as i noticed, default methods or class::method work. But there are no streams, consumer/producer interfaces. I dived into sources and noticed that there is no implementation for this methods/classes.

What is status of Java 8 collection interfaces/methods for GWT 2.8? Or there are no plans to include them into GWT 2.8.0?

The problem is that we cannot add Java 8 features to the Java runtime emulation while still supporting -sourceLevel 7.
So for now you can use the Java 8 language, but not the Java 8 APIs.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment