Download - 2013 JUG Madrid
-
8/12/2019 2013 JUG Madrid
1/31
To Java SE 8, and Beyond(Plan B)
Francisco Morero PeyronaEMEA Java Community Leader
-
8/12/2019 2013 JUG Madrid
2/31
...201
-
8/12/2019 2013 JUG Madrid
3/31
Priorities "or t#e Java Plat"or$s
%ro& 'evelo er Base
%ro& do tion
Increase *o$ etitiveness
da t to c#an+e
-
8/12/2019 2013 JUG Madrid
4/31
Evolvin+ t#e an+ua+eFrom Evolving the Java Language - JavaOne 2005
Java language principles Reading is more important than writing Code should e a !oy to read "he language should not hide what is happening
Code should do what it seems to do Every #good$ %eature adds more # ad$ weight &ometimes it is est to leave things out &implicity matters
-
8/12/2019 2013 JUG Madrid
5/31
Ho& Java Evolves and da ts'% the community( y the community( %or the commun
-
8/12/2019 2013 JUG Madrid
6/31
8
-
8/12/2019 2013 JUG Madrid
7/31
J'/ 8 0 Pro osed *ontent
-
8/12/2019 2013 JUG Madrid
8/31
Language
-
8/12/2019 2013 JUG Madrid
9/31
Bi+ 'isclai$er
"he synta) used in the%ollowing slides may
change
-
8/12/2019 2013 JUG Madrid
10/31
a$2da E3 ressions IClosures and Functional Programming
* Lam da e)pressions provide anonymous %unction types to Java* "hey replace the use o% single a stract method types +&AM,* "hey are !ust instances o% Runna le
Argument List Arrow "o-en .ody
+int )( int y, /0 ) 1 y
Synta3
+a, A single e)pression2 ody is evaluated and result value returned3
+ , &tatement loc-2 ody is evaluated as a method ody and #return$ statementreturns control to the caller3
.ody can e2
-
8/12/2019 2013 JUG Madrid
11/31
a$2da E3 ressions IIClosures and Functional Programming
Runnable r = () -> { System.out.println( "I'm a Runnable!" ); };
r.run();
jbutton.addActionListener( e -> { System.out.println( "Clicked" ); } );
* n -> n % 2 != 0;* (char c) -> c == 'y';
* (x, y) -> x + y;
* (int a, int b) -> a * a + b * b;
* () -> { return 3.14 };
* (String s) ->
{ System.out.println(s); };
* "ype o% parameters can e e)plicitly declared or ta-en %rom conte)t3* Argument parenthesis are optional when there is only one and its type
can e in%erred3* Argument List can e empty( i% it is so( parenthesis must e)ist3* 4% ody has more that one statement( then curly races are needed3
-
8/12/2019 2013 JUG Madrid
12/31
a$2da E3 ressions IIIClosures and Functional Programming
-
8/12/2019 2013 JUG Madrid
13/31
E3tension 4et#ods.ringing Multiple 4nheritance to Java
* Provide a mechanism to add new methods to e)isting inter%aces
* 5ithout rea-ing ac-wards compata ility* 6ives Java multiple inheritance
u2lic inter"ace Set e3tends *ollection5 u2lic int si6e()7
999 T#e rest o" t#e e3istin+ Set $et#ods
u2lic T reduce( :educer r ) de"ault *ollections9set:educ;
-
8/12/2019 2013 JUG Madrid
14/31
nnotations on Java Ty es
public void process(@notnull List data) {}
* Annotations can currently only e used on type declarations
* Classes( methods( varia le de%initions* E)tension %or places where types are used
* e3g3 Parameters
* Permits error detection y plugga le type chec-ers
* e3g3 null pointer errors( race conditions( etc
-
8/12/2019 2013 JUG Madrid
15/31
ccess to Para$eter a$es at :unti$e
* Mechanism to retrieve parameter names o% methods andconstructors
* At runtime via core re%lection
* 4mproved code reada ility* Eliminate redundant annotations
* 4mprove 47E capa ilities* Auto/generate template code
-
8/12/2019 2013 JUG Madrid
16/31
S$all T#in+s
* Repeating annotationsMultiple annotations with the same type applied to a single program element
* o more apt tool and associated AP4 Complete the transition to the J&R :9 implementation
* 7oc"ree AP4 Provide access to the syntactic elements o% a !avadoc comment
* 7ocLint tool ;se 7oc"ree AP4 to identi%y asic errors in !avadoc comments
* Javadoc support in javax.tools 4nvo-e !avadoc tools %rom AP4 as well as command line
-
8/12/2019 2013 JUG Madrid
17/31
Li rary
-
8/12/2019 2013 JUG Madrid
18/31
*oncurrency = dates
* &cala le update varia les DoubleAccumulator ( DoubleAdder ( etc
Multiple varia les avoid update contention 6ood %or %re=uent updates( in%re=uent reads
* ConcurrentHas !ap updates 4mproved scanning support( -ey computation
* "or#$oin%ool improvements Completion ased design %or 4' ound applications "hread that is loc-ed hands wor- to thread that is running
-
8/12/2019 2013 JUG Madrid
19/31
Bul 'ata ? erations "or *ollections
* Adding 3 et %unctionality* L4 > style processing
* &erial and parallel implementations* 6enerally e)pressed with Lam da statements
* Parallel implementation uilds on For-/Join %ramewor-
-
8/12/2019 2013 JUG Madrid
20/31
'ate and Ti$e PIs
* A new date( time( and calendar AP4 %or the Java &E plat%orm
* &upports standard time concepts* Partial( duration( period( intervals
* date( time( instant( and time/?one
* 4nitially provides a limited set o% calendar systems and will e
e)tensi le to others* ;ses relevant standards( including 4&'/8:@ ( CL7R( and .CPB
* .ased on an e)plicit time/scale with a connection to ;"C
-
8/12/2019 2013 JUG Madrid
21/31
J'B* 9Minor enhancements %or usa ility and porta ility
* Add setter
-
8/12/2019 2013 JUG Madrid
22/31
S$all (or er#a s not) t#in+s
* Enhance core li raries with Lam das +not small thing,* Parallel array sorting +improve )B,
* .ase :B Encoding and 7ecoding +no need o% undocumented AP4,* Charset implementation improvements
Reduced si?e o% charsets 4mproved per%ormance o% encoding
-
8/12/2019 2013 JUG Madrid
23/31
933
-
8/12/2019 2013 JUG Madrid
24/31
Java SE (and 2eyond@)
-
8/12/2019 2013 JUG Madrid
25/31
Aision Intero era2ility
* 4mproved support %or non/Java languages
* 4nvo-edynamic +done,* Java
-
8/12/2019 2013 JUG Madrid
26/31
Aision *loud
* Multi/tenancy +J7I 81,
* 4mproved sharing etween J Ms in same '&* Per/thread
-
8/12/2019 2013 JUG Madrid
27/31
Aision an+ua+e Ceatures
* Large data support +J7I 9,* Large arrays +:B it support,
* ;ni%ied type system +J7I @1,* o more primitives( ma-e everything o !ects
* 'ther type rei%ication +J7I @1,* "rue generics
* Function types
* 7ata structure optimi?ations +J7I @1,* &tructs( multi/dimensional arrays( etc* Close last+K, per%ormance gap to low/level languages
-
8/12/2019 2013 JUG Madrid
28/31
Aision Inte+ration
* Modern device support +J7I 81,
* Multitouch +J7I 81,* Location +J7I 81,* &ensors H compass( accelerometer( temperature( pressure( 333 +J7I 81,
* Geterogenous compute models +J7I 91,
* Java language support %or 6P;( FP6A( o%%load engines( remote PLL333
-
8/12/2019 2013 JUG Madrid
29/31
T#e Pat# Cor&ard (J'/ 1D)
* 'pen development* Prototyping and R 7 in 'penJ7I* Cooperate with partners( academia( greater community
* 5or- on ne)t J7I( %uture %eatures in parallel
*/year cycle %or Java &E releases
J SE " $ J'/ J'/ 1
-
8/12/2019 2013 JUG Madrid
30/31
Java SE "ro$ J'/ to J'/ 1
D11 D1F D1
J'/
D1! D1
J'/ 8 J'/ J'/ 1D J'/ 11
D1
JA4 conver+ence
4ac ?S G
-
8/12/2019 2013 JUG Madrid
31/31