SlideShare una empresa de Scribd logo
1 de 62
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Lambda/Streams Hands-On Lab
Lambda/Streams Hands-On LabLambda/Streams Hands-On Lab
Lambda/Streams Hands-On LabMaurice Naftalin
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with XtendSven Efftinge
 
Xtend - better java with -less- noise
Xtend - better java with -less- noiseXtend - better java with -less- noise
Xtend - better java with -less- noiseNeeraj Bhusare
 
JDT embraces lambda expressions
JDT embraces lambda expressionsJDT embraces lambda expressions
JDT embraces lambda expressionsEclipse Day India
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8Talha Ocakçı
 
C#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New FeaturesC#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New Featurestechfreak
 
Can't Dance The Lambda
Can't Dance The LambdaCan't Dance The Lambda
Can't Dance The LambdaTogakangaroo
 
C++ to java
C++ to javaC++ to java
C++ to javaAjmal Ak
 
Functional programming in scala
Functional programming in scalaFunctional programming in scala
Functional programming in scalaStratio
 
Java findamentals1
Java findamentals1Java findamentals1
Java findamentals1Todor Kolev
 
Java findamentals1
Java findamentals1Java findamentals1
Java findamentals1Todor Kolev
 
Java findamentals1
Java findamentals1Java findamentals1
Java findamentals1Todor Kolev
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEdward Willink
 

La actualidad más candente (20)

Lambda/Streams Hands-On Lab
Lambda/Streams Hands-On LabLambda/Streams Hands-On Lab
Lambda/Streams Hands-On Lab
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with Xtend
 
The OCLforUML Profile
The OCLforUML ProfileThe OCLforUML Profile
The OCLforUML Profile
 
Cs30 New
Cs30 NewCs30 New
Cs30 New
 
From Java to Kotlin
From Java to KotlinFrom Java to Kotlin
From Java to Kotlin
 
Xtend - better java with -less- noise
Xtend - better java with -less- noiseXtend - better java with -less- noise
Xtend - better java with -less- noise
 
JDT embraces lambda expressions
JDT embraces lambda expressionsJDT embraces lambda expressions
JDT embraces lambda expressions
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8
 
C#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New FeaturesC#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New Features
 
C#4.0 features
C#4.0 featuresC#4.0 features
C#4.0 features
 
Can't Dance The Lambda
Can't Dance The LambdaCan't Dance The Lambda
Can't Dance The Lambda
 
C progrmming
C progrmmingC progrmming
C progrmming
 
C++ to java
C++ to javaC++ to java
C++ to java
 
Functional programming in scala
Functional programming in scalaFunctional programming in scala
Functional programming in scala
 
Aligning OCL and UML
Aligning OCL and UMLAligning OCL and UML
Aligning OCL and UML
 
Java8 features
Java8 featuresJava8 features
Java8 features
 
Java findamentals1
Java findamentals1Java findamentals1
Java findamentals1
 
Java findamentals1
Java findamentals1Java findamentals1
Java findamentals1
 
Java findamentals1
Java findamentals1Java findamentals1
Java findamentals1
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and Debugging
 

Similar a JDT Embraces Lambda Expressions - EclipseCon North America 2014

Syntactic Salt and Sugar Presentation
Syntactic Salt and Sugar PresentationSyntactic Salt and Sugar Presentation
Syntactic Salt and Sugar Presentationgrepalex
 
Introduction of lambda expression and predicate builder
Introduction of lambda expression and predicate builderIntroduction of lambda expression and predicate builder
Introduction of lambda expression and predicate builderLearningTech
 
C#-LINQ-and-Lambda-Expression
C#-LINQ-and-Lambda-ExpressionC#-LINQ-and-Lambda-Expression
C#-LINQ-and-Lambda-ExpressionSimplilearn
 
Functional programming in java 8 by harmeet singh
Functional programming in java 8 by harmeet singhFunctional programming in java 8 by harmeet singh
Functional programming in java 8 by harmeet singhHarmeet Singh(Taara)
 
Eclipse Day India 2015 - Java 8 Overview
Eclipse Day India 2015 - Java 8 OverviewEclipse Day India 2015 - Java 8 Overview
Eclipse Day India 2015 - Java 8 OverviewEclipse Day India
 
Java 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsJava 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsNewCircle Training
 
What's new in java 8
What's new in java 8What's new in java 8
What's new in java 8Dian Aditya
 
Lambda Expressions Java 8 Features usage
Lambda Expressions  Java 8 Features usageLambda Expressions  Java 8 Features usage
Lambda Expressions Java 8 Features usageAsmaShaikh478737
 
New features in jdk8 iti
New features in jdk8 itiNew features in jdk8 iti
New features in jdk8 itiAhmed mar3y
 
Java 8 - An Overview
Java 8 - An OverviewJava 8 - An Overview
Java 8 - An OverviewIndrajit Das
 
Introduction to Scala Macros
Introduction to Scala MacrosIntroduction to Scala Macros
Introduction to Scala MacrosKnoldus Inc.
 
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...AboutYouGmbH
 
OpenDaylight and YANG
OpenDaylight and YANGOpenDaylight and YANG
OpenDaylight and YANGCoreStack
 
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverWhat's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverCodemotion
 

Similar a JDT Embraces Lambda Expressions - EclipseCon North America 2014 (20)

Java 8 Lambda
Java 8 LambdaJava 8 Lambda
Java 8 Lambda
 
Syntactic Salt and Sugar Presentation
Syntactic Salt and Sugar PresentationSyntactic Salt and Sugar Presentation
Syntactic Salt and Sugar Presentation
 
What`s New in Java 8
What`s New in Java 8What`s New in Java 8
What`s New in Java 8
 
Introduction of lambda expression and predicate builder
Introduction of lambda expression and predicate builderIntroduction of lambda expression and predicate builder
Introduction of lambda expression and predicate builder
 
Java SE 8 library design
Java SE 8 library designJava SE 8 library design
Java SE 8 library design
 
C#-LINQ-and-Lambda-Expression
C#-LINQ-and-Lambda-ExpressionC#-LINQ-and-Lambda-Expression
C#-LINQ-and-Lambda-Expression
 
Functional programming in java 8 by harmeet singh
Functional programming in java 8 by harmeet singhFunctional programming in java 8 by harmeet singh
Functional programming in java 8 by harmeet singh
 
Eclipse Day India 2015 - Java 8 Overview
Eclipse Day India 2015 - Java 8 OverviewEclipse Day India 2015 - Java 8 Overview
Eclipse Day India 2015 - Java 8 Overview
 
Java 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsJava 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & Streams
 
What's new in java 8
What's new in java 8What's new in java 8
What's new in java 8
 
Lambda Expressions Java 8 Features usage
Lambda Expressions  Java 8 Features usageLambda Expressions  Java 8 Features usage
Lambda Expressions Java 8 Features usage
 
C++11
C++11C++11
C++11
 
New features in jdk8 iti
New features in jdk8 itiNew features in jdk8 iti
New features in jdk8 iti
 
Java 8 - An Overview
Java 8 - An OverviewJava 8 - An Overview
Java 8 - An Overview
 
Java 8 stream and c# 3.5
Java 8 stream and c# 3.5Java 8 stream and c# 3.5
Java 8 stream and c# 3.5
 
Introduction to Scala Macros
Introduction to Scala MacrosIntroduction to Scala Macros
Introduction to Scala Macros
 
What’s new in java 8
What’s new in java 8What’s new in java 8
What’s new in java 8
 
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
 
OpenDaylight and YANG
OpenDaylight and YANGOpenDaylight and YANG
OpenDaylight and YANG
 
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverWhat's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - Weaver
 

Más de Noopur Gupta

Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!Noopur Gupta
 
Java 14 support in Eclipse IDE
Java 14 support in Eclipse IDEJava 14 support in Eclipse IDE
Java 14 support in Eclipse IDENoopur Gupta
 
Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!
Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!
Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!Noopur Gupta
 
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...Noopur Gupta
 
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!Noopur Gupta
 
What's cool in Eclipse goody bag!
What's cool in Eclipse goody bag!What's cool in Eclipse goody bag!
What's cool in Eclipse goody bag!Noopur Gupta
 
High productivity development with Eclipse and Java 8
High productivity development with Eclipse and Java 8High productivity development with Eclipse and Java 8
High productivity development with Eclipse and Java 8Noopur Gupta
 

Más de Noopur Gupta (7)

Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
 
Java 14 support in Eclipse IDE
Java 14 support in Eclipse IDEJava 14 support in Eclipse IDE
Java 14 support in Eclipse IDE
 
Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!
Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!
Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!
 
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
 
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
 
What's cool in Eclipse goody bag!
What's cool in Eclipse goody bag!What's cool in Eclipse goody bag!
What's cool in Eclipse goody bag!
 
High productivity development with Eclipse and Java 8
High productivity development with Eclipse and Java 8High productivity development with Eclipse and Java 8
High productivity development with Eclipse and Java 8
 

Último

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

JDT Embraces Lambda Expressions - EclipseCon North America 2014

  • 1. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 1 Srikanth Sankaran IBM India Stephan Herrmann GK Software Noopur Gupta IBM India
  • 2. 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
  • 3. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 3
  • 4. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 4
  • 5. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 5
  • 6. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 6
  • 7. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 7
  • 8. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 8
  • 9. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 9
  • 10. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 10 LambdaExpression ::= LambdaParameters '->' LambdaBody LambdaParameters -> BeginLambda LambdaParameterList LambdaParameterList -> '(' FormalParameterListopt ')„ LambdaBody -> Expression LambdaBody -> Block I i = BeginLambda (x) -> { };
  • 11. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 11
  • 12. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 12
  • 13. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 13
  • 14. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 14
  • 15. 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.
  • 16. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 16
  • 17. 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
  • 18. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 18
  • 19. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 19
  • 20. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 20
  • 21. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 21 Collectors.<Person,String,Integer>toMap(..) Collectors.toMap(..) Collector<String,Integer> coll = new MyCollector<>();
  • 22. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 22
  • 23. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 23
  • 24. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 24
  • 25. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 25
  • 26. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 26
  • 27. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 27
  • 28. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 28
  • 29. 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
  • 30. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 30
  • 31. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 31
  • 32. EclipseCon NA 2014 | JDT Embraces Lambda Expressions Enter +Ctrl 1 32
  • 33. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 33 Enter +Ctrl 1
  • 34. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 34 Enter +Ctrl 1
  • 35. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 35 Enter +Ctrl 1
  • 36. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 36
  • 37. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 37 Lambda Expression: Method Reference:
  • 38. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 38 Demo Examples:
  • 39. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 39
  • 40. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 40
  • 41. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 41
  • 42. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 42
  • 43. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 43
  • 44. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 44
  • 45. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 45
  • 46. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 46
  • 47. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 47
  • 48. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 48 Far too risky to cram late into 8 (Nov 2013)
  • 49. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 49 List <: List<String> ? Raw types
  • 50. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 50 “Problem detected during type inference: ...”
  • 51. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 51
  • 52. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 52
  • 53. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 53
  • 54. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 54
  • 55. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 55
  • 56. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 56
  • 57. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 57
  • 58. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 58
  • 59. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 59
  • 60. 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
  • 61. EclipseCon NA 2014 | JDT Embraces Lambda Expressions 61
  • 62. EVALUATE THIS SESSION Sign-in: www.eclipsecon.org Select session from schedule Evaluate: 1 2 3