JDT Embraces Lambda Expressions - EclipseCon North America 2014

50 %
50 %
Information about JDT Embraces Lambda Expressions - EclipseCon North America 2014
Technology

Published on March 20, 2014

Author: NoopurGupta6

Source: slideshare.net

Description

Java 8 is coming. It is happening right here. Developers of your favorite Java IDE are participating in shaping this long awaited milestone for the Java ecosystem: On time with the GA of Java 8, JDT will ship its first release with support for developing in Java 8.

If you have a basic understanding of the new features in Java 8, come here and learn how the JDT team mastered the challenges of lifting the Eclipse Java IDE to the next language version.

The main focus of this talk will be on lambda expressions, touching also some changes in the libraries that leverage lambda expressions. We will expose some examples demonstrating the complexity of the language and mention some caveats which should help you avoid some unpleasent surprises.

We will demo how to get started using Java 8 in Eclipse and show the latest tool features for working with lambda expressions including new quick assists etc.

Finally, we'll give a retrospective discussion of the situation of the JDT team, in terms of team changes, contributors, deadlines, interaction with expert groups, with the Eclipse community, and more.

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 1 Srikanth Sankaran IBM India Stephan Herrmann GK Software Noopur Gupta IBM India

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 2 Java 8 features: JSR335 - Project Lambda  Lambda Expressions & Method References  Extensions to Overload resolution & Type inference  Support for “code carrying” interface methods. JSR308 - Type Annotations JEP120 - Repeating Annotations JEP118 - Method Parameter Reflection JSR269 - Pluggable Annotation Processor API & javax.lang.model API enhancements for Java 8

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 3

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 4

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 5

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 6

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 7

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 8

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 9

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 10 LambdaExpression ::= LambdaParameters '->' LambdaBody LambdaParameters -> BeginLambda LambdaParameterList LambdaParameterList -> '(' FormalParameterListopt ')„ LambdaBody -> Expression LambdaBody -> Block I i = BeginLambda (x) -> { };

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 11

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 12

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 13

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 14

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 15 Scanning + Parsing => Parse tree + Resolution => Resolved parse tree + Data/control flow analysis => Flow analyzed parse tree + Code generation => Class files. () -> { throw new Exception(); } is void and value compatible.

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 16

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 17 o Changes the very notion of a type. o Some subsystems should view @NonNull String != @ReadOnly String o while others should view them as being the same. o Abstractions need to support either world view efficiently. String is a String is a String

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 18

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 19

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 20

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 21 Collectors.<Person,String,Integer>toMap(..) Collectors.toMap(..) Collector<String,Integer> coll = new MyCollector<>();

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 22

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 23

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 24

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 25

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 26

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 27

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 28

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 29  Recipe for disaster: ● implement java.util.List → compile against JRE 7 → OK ● upgrade to JRE 8 but compile as 1.7  Undefined compiler behavior ● 1.7 compiler cannot handle default methods (from .class) ● exact answer depends on compiler implementation details ● there is no specification ● ecj and javac differ ● assimilation is difficult

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 30

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 31

EclipseCon NA 2014 | JDT Embraces Lambda Expressions Enter +Ctrl 1 32

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 33 Enter +Ctrl 1

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 34 Enter +Ctrl 1

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 35 Enter +Ctrl 1

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 36

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 37 Lambda Expression: Method Reference:

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 38 Demo Examples:

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 39

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 40

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 41

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 42

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 43

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 44

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 45

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 46

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 47

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 48 Far too risky to cram late into 8 (Nov 2013)

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 49 List <: List<String> ? Raw types

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 50 “Problem detected during type inference: ...”

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 51

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 52

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 53

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 54

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 55

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 56

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 57

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 58

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 59

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 60 Dramatis personæ - The usual suspects Jay Arthanareeswaran Deepak Azad Shankha Banerjee Anirban Chakarborty Vikas Chandra Noopur Gupta Ayushman Jain Manju Mathew Manoj Palat Srikanth Sankaran Sarika Sinha Jesper S. Møller Stephan Herrmann Markus Keller Dani Megert Andy Clement Steve Francisco Michael Rennie Olivier Thomann Curtis Windatt Walter Harley David Williams

EclipseCon NA 2014 | JDT Embraces Lambda Expressions 61

EVALUATE THIS SESSION Sign-in: www.eclipsecon.org Select session from schedule Evaluate: 1 2 3

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

JDT embraces lambda expressions | EclipseCon North-America ...

EclipseCon North-America 2014 Burlingame, CA EclipseCon is brought to you by the Eclipse Foundation with the support of our sponsors. March 17-20, 2014
Read more

Lambda Expressions | EclipseCon North-America 2014

Lambda Expressions. Mon, ... Read more about JDT embraces lambda expressions; ... please visit the EclipseCon North-America 2014 sponsor prospectus page.
Read more

JDT Embraces Java 8 - Eclipse - The Eclipse Foundation ...

january 2014; JDT Embraces ... If you happen to attend EclipseCon North America in ... and the main talk at “JDT embraces lambda expressions”. ...
Read more

Fazit | heise Developer

JDT embraces lambda expressions (Slides eines Vortrags von der EclipseCon North America, März 2014) JDT embraces ... Ausgabe der EclipseCon ...
Read more

Jdt | LinkedIn

JDT Embraces Lambda Expressions - EclipseCon North America 2014. 762 Views. ... 67 Views. eclipsedayindia. JDT embraces lambda expressions. 172 Views ...
Read more

EclipseCon 2014: Java 8 Support, Flux Integrates Orion ...

EclipseCon 2014: Java 8 Support, Flux Integrates Orion. The big news at the latest edition of EclipseCon North America, which wrapped up in San Francisco ...
Read more

Lambda Expressions | LinkedIn

Lambda Expressions at a glance: 2,482 LinkedIn members have this skill. Where they work. Accenture (16 members) Cognizant (13 members) Genpact Headstrong ...
Read more

Eclipse Day Bangalore 2014 - Eclipsepedia

Eclipse Day Bangalore 2014; ... JDT Embraces Lambda Expressions in Java8 ... Eclipse JDT/Core. Most popular speaker at EclipseCon North America 2014.
Read more