Re: Java 8 and type erasure

2015-08-28 Thread Timo Walther
Hey Kristoffer, sorry for the late reply. I was on vacation. Here you can find my initial email that also contains a description and a link to the patch: http://mail.openjdk.java.net/pipermail/compiler-dev/2015-January/009220.html The Eclipse JDT team didn't really need a patch. Their

Re: Java 8 and type erasure

2015-08-18 Thread Aljoscha Krettek
Hi Kristoffer, I'm afraid not, but maybe Timo has some further information. In this extended example we can see the problem: https://gist.github.com/aljoscha/84cc363d13cf1dfe9364. The output is: Type is: class org.apache.flink.examples.java8.wordcount.TypeTest$Thing class

Re: Java 8 and type erasure

2015-08-18 Thread Stephan Ewen
Wow, that looks super interesting. Will try that out later. Thanks for sharing :-) On Tue, Aug 18, 2015 at 11:01 AM, Kristoffer Sjögren sto...@gmail.com wrote: Hi Potential fix for writing flink jobs using lamdas without Eclipse JDT?

Re: Java 8 and type erasure

2015-08-18 Thread Kristoffer Sjögren
:-) On Tue, Aug 18, 2015 at 11:03 AM, Stephan Ewen se...@apache.org wrote: Wow, that looks super interesting. Will try that out later. Thanks for sharing :-) On Tue, Aug 18, 2015 at 11:01 AM, Kristoffer Sjögren sto...@gmail.com wrote: Hi Potential fix for writing flink jobs using

Java 8 and type erasure

2015-08-18 Thread Kristoffer Sjögren
Hi Potential fix for writing flink jobs using lamdas without Eclipse JDT? https://gist.github.com/aslakhellesoy/3678beba60c109eacbe5 Cheers, -Kristoffer

Re: Java 8 and type erasure

2015-08-18 Thread Kristoffer Sjögren
How about https://github.com/jhalterman/typetools? On Tue, Aug 18, 2015 at 11:16 AM, Aljoscha Krettek aljos...@apache.org wrote: Hi Kristoffer, I'm afraid not, but maybe Timo has some further information. In this extended example we can see the problem:

Re: Java 8 and type erasure

2015-08-18 Thread Stephan Ewen
Hi Kristoffer! I looked through the code as well. In fact, Flink currently uses the trick mentioned for Serializable Lambdas in the gist you sent me. This works well for lambdas that return simple types (primitives or classes without generics). The information for the generic parametrization is

Re: Java 8 and type erasure

2015-08-18 Thread Stephan Ewen
Would have been great. I had high hopes when I saw the trick with the constant pool, but this is only to make what Flink does already applicable to non-serializable lambdas. If you want to help us with this, I'll ping you for some support on the OpenJDK mailing list ;-) On Tue, Aug 18, 2015 at

Re: Java 8 and type erasure

2015-08-18 Thread Stephan Ewen
Timo should still have the patch! If you want to re-vive the thread, that'd be great. I'd be happy to support it. On Tue, Aug 18, 2015 at 2:51 PM, Kristoffer Sjögren sto...@gmail.com wrote: Do you have a link to these patches? Reading through the thread, I get the feeling they didn't

Re: Java 8 and type erasure

2015-08-18 Thread Kristoffer Sjögren
I suspected that you already had looked into this, but it was worth a try. It would make everything so much easier. Thanks for the explanation :-) On Tue, Aug 18, 2015 at 1:50 PM, Stephan Ewen se...@apache.org wrote: Hi Kristoffer! I looked through the code as well. In fact, Flink currently

Re: Java 8 and type erasure

2015-08-18 Thread Kristoffer Sjögren
Yeah, I think I found the thread already... by Timo Walther? On Tue, Aug 18, 2015 at 2:01 PM, Stephan Ewen se...@apache.org wrote: Would have been great. I had high hopes when I saw the trick with the constant pool, but this is only to make what Flink does already applicable to

Re: Java 8 and type erasure

2015-08-18 Thread Kristoffer Sjögren
Do you have a link to these patches? Reading through the thread, I get the feeling they didn't reject the idea completely. Considering there are also other projects (Crunch, Spark, Storm, etc) that would benefit from this, maybe we can convince them together? On Tue, Aug 18, 2015 at 2:27 PM,