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

Similar documents
Eclipse and Java 8. Daniel Megert Platform and JDT Lead Eclipse PMC Member IBM Rational Zurich Research Lab

A Deep Dive into the Void

Embracing. with. Noopur Gupta. Eclipse JDT co-lead. IBM

Java 11 and MAKING ECLIPSE JDT FUTURE READY MANOJ PALAT IBM

Andy Clement, SpringSource/VMware SpringSource, A division of VMware. All rights reserved

The Future of Code Coverage for Eclipse

Noopur Gupta Eclipse JDT/UI Committer IBM India

The Java Language Specification. Java SE 8 Edition

Fundtech JRE 1.7 Update 45 Issues and Resolution

Lambda expressions in Java: a compiler writer's perspective. Maurizio Cimadamore Type-system engineer, Oracle Corporation

Oracle Corporation

About Tom. CEO BestSolution Systemhaus GmbH. Eclipse Committer. Platform UI EMF. Projectlead: UFaceKit, Nebula. Member of the Architectual Council

Java Language Modularity With Superpackages

Eclipse Memory Analyzer Release Review

How To Train the JDT Dragon

Metadata Features in Java SE 8

Mixed projects: Java + Kotlin. Svetlana Isakova

Quick start. Robert Bachmann & Dominik Dorn. JSUG Meeting #63

Using Type Annotations to Improve Your Code

Generics: Past, Present

An Eiffel Library for Units of Measurement

The Checker Framework: pluggable static analysis for Java

Enterprise Java in 2012 and Beyond From Java EE 6 To Cloud Computing

Code verification. CSE 331 University of Washington. Michael Ernst

IP Log for eclipse.jdt

Java gets a closure. Tomasz Kowalczewski

Object Teams Release Review. Planned Review Date: July 7, 2010 Communcation Channel: Submitted by: Stephan Herrmann

Adapting JDT to the Cloud. Alex Boyko Pivotal Jay Arthanareeswaran - IBM John Arthorne - IBM

The Art of Metaprogramming in Java. Falguni Vyas Dec 08, 2012

Refactoring with Eclipse

New Features in Java language

Goulwen Le Fur Obeo EclipseCon NA 2014

Eclipse Memory Analyzer Release Review 0.8

The Heads and Tails of Project Coin

SHIFTLEFT OCULAR THE CODE PROPERTY GRAPH

JML and Java 1.5+ David R. Cok Eastman Kodak Company, Research Laboratories 9 October 2008 SAVCBS08 workshop

Reactive Programming in Java. Copyright - Syncogni Consulting Pvt Ltd. All rights reserved.

PROCE55 Mobile: Web API App. Web API.

Java 8, Java 9, and Beyond!

AJDT: Getting started with Aspect-Oriented Programming in Eclipse

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Monday, June 3, 13

Fast Track to Core Java 8 Programming for OO Developers (TT2101-J8) Day(s): 3. Course Code: GK1965. Overview

Detecting and preventing null pointer errors with pluggable type-checking

CSCE 314 Programming Languages. Type System

Installation guide for Java. Step by Step Guide. A C A D G I L D Page 1

Generics: Past, Present and Future

<Insert Picture Here> JSR-335 Update for JCP EC Meeting, January 2012

What is Eclipse? A free copy can be downloaded at:

1 Markus Eisele, Insurance - Strategic IT-Architecture

c-lambda: C FFI via raco ctool

Advanced Topics in Java and on Security in Systems Effective Generics. Eirik Eltvik 26 th of February 2007

Reactive Programming in Java. Copyright - Syncogni Consulting Pvt Ltd. All rights reserved.

Test Factoring: Focusing test suites on the task at hand

JSR 367 (JSON Binding) Review

Every language has its own scoping rules. For example, what is the scope of variable j in this Java program?

Quick tour of the Test and Performance Tools Platform (TPTP) Valentina Popescu IBM Tivoli TPTP AG Lead

Introduction to Programming Using Java (98-388)

Oracle Corporation OSCON 2012

Semantic Versioning A Large Existing Codebase

JBoss Tattletale 1.1 Developer's Guide

C # 7, 8, and beyond: language features from design to release to IDE support. Kevin

Asynchronous Functions in C#

Programming for Mobile Computing

Desarrollo de Aplicaciones en Red RMI. Introduction. Considerations. Considerations. RMI architecture

Generic Programming Constructs and Applications in Object-Oriented Languages

Java Programming Best Practices Part V. Timothy Fagan Ishi Systems, Inc.

API Tooling in the Eclipse SDK

Annotation Processing

Lyo OSLC4J and OSLC Test Suite 1.0 Release and Graduation Review

JSR 311: JAX-RS: The Java API for RESTful Web Services

Detecting and preventing null pointer errors with pluggable type-checking

Preventing Errors Before They Happen The Checker Framework

JSR-286: Portlet Specification 2.0

JSR 365 (CDI 2.0) Review

Basic Keywords Practice Session

Certified Core Java Developer VS-1036

JDK 9/10/11 and Garbage Collection

Introduction to Reflective Java

23/02/15. Compile, execute, debug. Advanced Programming THE JAVA PLATFORM

Java SE 8 Overview. Simon Ritter Head of Java Technology Evangelism.

First steps with R + Eclipse

In order to support developers, there needs to be a number of tools available which may be involved in the ultimate solution.

Migrate early, migrate often! JDK release cadence strategies

VIRTUAL FUNCTIONS Chapter 10

Google Web Toolkit for quick relief of AJAX pain. Kelly Norton & Miguel Méndez

The NetRexx Interpreter

Using APIs. Chapter 3. Outline Fields Overall Layout. Java By Abstraction Chapter 3. Field Summary static double PI

Spring Framework 5.0 on JDK 8 & 9

VCGL software quality sessions: Documenting with. Anatoliy Antonov May 2012

Project Compiler. CS031 TA Help Session November 28, 2011

ArcGIS Runtime SDK for Java: Building Apps. Mark Baird

ExtendJ The Extensible Java Compiler. Jesper Öqvist, PhD Student Lund University

The Role of Mathematical Equivalence in Fortran. David Muxworthy 27 September 2012

Index. Decomposability, 13 Deep reflection, 136 Dependency hell, 19 --describe-module, 39

Computational Applications in Nuclear Astrophysics using Java Java course Lecture 1

Black Box DCX3000 / DCX1000 Using the API

HOW WE MOVED FROM JAVA TO SCALA

LGTM Enterprise System Requirements. Release , August 2018

Install and Configure ANTLR 4 on Eclipse and Ubuntu

Asynchronous OSGi: Promises for the masses. Tim Ward.

Transcription:

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

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 2

3

4

5

6

7

8

9

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

11

12

13

14

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 15

16

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 17

18

19

20

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

22

23

24

25

26

27

28

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 29

30

31

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

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

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

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

36

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

Demo Examples: EclipseCon NA 2014 JDT Embraces Lambda Expressions 38

39

40

41

42

43

44

45

46

47

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

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

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

51

52

53

54

55

56

57

58

59

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

61

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