SlideShare une entreprise Scribd logo
1  sur  57
Télécharger pour lire hors ligne
Copyright © 2014 Russel Winder 1
Java is Dead
Long Live Scala, Kotlin, Ceylon,
etc.
Russel Winder
email: russel@winder.org.uk
xmpp: russel@winder.org.uk
twitter: @russel_winder
Web: http://www.russel.org.uk
Copyright © 2014 Russel Winder 2
Java is Dead
Copyright © 2014 Russel Winder 3
Java is Dying
Copyright © 2014 Russel Winder 4
What are the symptoms?
● Java is seriously verbose.
● Java has poor type inference.
● Java has only low-level support for concurrency and
parallelism.
● Java generates a dependency hell .“ ”
● Java is a 1990s imperative language that isn't really
object-oriented.
● …
Copyright © 2014 Russel Winder 5
Is there a cure?
● Can Java:
● Be less verbose.
● Have better type inferencing.
● Do concurrency and parallelism better. (Doug Lea, Brian
Goetz and others have actually been doing this for a
while.)
● Have a reasonable module system, cf. Jigsaw vs. OSGi.
● Be a real object-oriented language.
Copyright © 2014 Russel Winder 6
Prognosis: not great
Copyright © 2014 Russel Winder 7
Alternatives?
Copyright © 2014 Russel Winder 8
Create a new language
● Java is a statically
typed, compiled
language, so create a
new statically typed
compiled language:
● Scala
● Kotlin
● Ceylon
● Fantom
● ?
Copyright © 2014 Russel Winder 9
Gross oversimplifications…
Copyright © 2014 Russel Winder 10
Scala
● Integrates functional
and object-oriented.
● Very declarative style
of expression.
● Strong support for data
parallelism. Also Akka
for actors and such-like.
● Strong static type
checking with
inferencing and reified
generic type
parameters.
Copyright © 2014 Russel Winder 11
Kotlin
● Top-level functions.
● Object-oriented, with
functional elements
● Strong static type
checking with
inferencing.
● Has modules.
● Allows extension
methods.
● Compiles to JavaScript
or JVM to support
end-to-end Web
applications
development.
Copyright © 2014 Russel Winder 12
Ceylon
● Top-level functions.
● Object oriented with
functional features.
● Strong static typing
with inference.
● Explicit module
system.
● JavaScript and JVM
backends so as to be
end-to-end for Web
applications
development.
Copyright © 2014 Russel Winder 13
Fantom
● Top-level functions.
● Object-oriented.
● Integrated modules
system via pods.
● Targets JVM and CLR.
Copyright © 2014 Russel Winder 14
?
The identity of this statically typed, object-oriented
(with functional bits) language for the JVM will
remain unnamed at this time to preserve the air
of mystery and suspense.
Copyright © 2014 Russel Winder 15
Copyright © 2014 Russel Winder 16
Code!
Copyright © 2014 Russel Winder 17
Copyright © 2014 Russel Winder 18

Copyright © 2014 Russel Winder 19
Copyright © 2014 Russel Winder 20
What is the value of ?
Easy, it's known exactly.
It's .
Obviously.
Copyright © 2014 Russel Winder 21
It's simples
Александр Орлов 2009
Copyright © 2014 Russel Winder 22
Approximating 
● What is it's value represented as a floating
point number?
● We can only obtain an approximation.
● A plethora of possible algorithms to choose from, a
popular one is to employ the following integral
equation.

4
=∫0
1 1
1x2
dx
Copyright © 2014 Russel Winder 23
One possible algorithm
● Use quadrature to estimate the value of the
integral which is the area under the curve.–
=
4
n
∑i=1
n 1
1
i−0.5
n

2
With n = 3 not much to do,
but potentially lots of error.
Use n = 107
or n = 109
?
Embarrassingly
parallel.
Copyright © 2014 Russel Winder 24
Because addition is commutative and
associative, expression can be
decomposed into sums of partial sums.
Copyright © 2014 Russel Winder 25
a + b + c + d + e + f
=
( a + b ) + ( c + d ) + ( e + f )
Copyright © 2014 Russel Winder 26
Scatter Gather—
map reduce
data parallel
Copyright © 2014 Russel Winder 27
Code!
Copyright © 2014 Russel Winder 28
Scala
Kotlin
Ceylon
Fantom
Copyright © 2014 Russel Winder 29
?
Copyright © 2014 Russel Winder 30
Surprise time…
Copyright © 2014 Russel Winder 31
JVM is a Groovy place
Copyright © 2014 Russel Winder 32
Groovy
● Top-level functions
● Object-oriented with
functional features.
● Extension methods.
● Compiles to JVM bytes
codes or JavaScript
(cf. GrooScript)
● A dynamic language
with a run time
meta-object protocol.
Copyright © 2014 Russel Winder 33
Groovy
A statically typed,
compiled language.
Copyright © 2014 Russel Winder 34
@TypeChecked
@CompileStatic
Copyright © 2014 Russel Winder 35
Groovy
● @TypeChecked:
● Traditional dynamic
Groovy but with full
static (compile-time)
type checking.
● @CompileStatic:
● Full static typechecked,
compilation to bytecode
at compile time.
● No dynamic meta-
object protocol.
Copyright © 2014 Russel Winder 36
Code!
Copyright © 2014 Russel Winder 37
Copyright © 2014 Russel Winder 38
Code!
Copyright © 2014 Russel Winder 39
Did I mention invokedynamic?
Copyright © 2014 Russel Winder 40
Code!
Copyright © 2014 Russel Winder 41
Java is Dead!
Copyright © 2014 Russel Winder 42
Groovy
(or Scala, Kotlin, Ceylon, Fantom, )…
is the future of static languages
on the JVM.
Copyright © 2014 Russel Winder 43
2014-03-18
Copyright © 2014 Russel Winder 44
Java 8
Released
Copyright © 2014 Russel Winder 45
Java 8 is the biggest revolution
in Java since 1994.
Bigger than Java 5.
Copyright © 2014 Russel Winder 46
Has Java revived?
Is this a new lease of life?
Copyright © 2014 Russel Winder 47
What's Interesting in Java 8?
● G1 garbage collector.
● Nashorn.
● JavaFX.
● Lambda expressions.
● Default methods in
interfaces (traits).
● Enhanced collections.
Copyright © 2014 Russel Winder 48
G1 garbage collector is now the
standard: no more PermGen.
Copyright © 2014 Russel Winder 49
Nashorn comes as standard:
Server-side JavaScript without Rhino.
Copyright © 2014 Russel Winder 50
JavaFX in the distribution:
you will want to use GroovyFX though.
Copyright © 2014 Russel Winder 51
Lambda expressions,
default methods in interfaces,
associated collections enhancements.
Copyright © 2014 Russel Winder 52
Code!
Copyright © 2014 Russel Winder 53
Copyright © 2014 Russel Winder 54
Code!
Copyright © 2014 Russel Winder 55
Java is Dead
Long Live Scala, Kotlin, Ceylon,
etc.
Russel Winder
email: russel@winder.org.uk
xmpp: russel@winder.org.uk
twitter: @russel_winder
Web: http://www.russel.org.uk
Copyright © 2014 Russel Winder 56
Java is Dead
Long Live Java
Russel Winder
email: russel@winder.org.uk
xmpp: russel@winder.org.uk
twitter: @russel_winder
Web: http://www.russel.org.uk
Copyright © 2014 Russel Winder 57
Java is Dead
Long Live Groovy
Russel Winder
email: russel@winder.org.uk
xmpp: russel@winder.org.uk
twitter: @russel_winder
Web: http://www.russel.org.uk

Contenu connexe

Similaire à Java is dead, long live Scala Kotlin Ceylon etc.

Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformThomas Wuerthinger
 
Reflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzReflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzJAXLondon2014
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooRob Tweed
 
JRuby in a Java World
JRuby in a Java WorldJRuby in a Java World
JRuby in a Java WorldMark Menard
 
Core java programming tutorial - Brainsmartlabs
Core java programming tutorial - BrainsmartlabsCore java programming tutorial - Brainsmartlabs
Core java programming tutorial - Brainsmartlabsbrainsmartlabsedu
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programmingbusiness Corporate
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java ProgrammingRavi Kant Sahu
 
Apache Drill (ver. 0.1, check ver. 0.2)
Apache Drill (ver. 0.1, check ver. 0.2)Apache Drill (ver. 0.1, check ver. 0.2)
Apache Drill (ver. 0.1, check ver. 0.2)Camuel Gilyadov
 
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěJaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěDevelcz
 
Chapter-1 Introduction.pptx
Chapter-1 Introduction.pptxChapter-1 Introduction.pptx
Chapter-1 Introduction.pptxSumanBhandari40
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorialtutorialsruby
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorialtutorialsruby
 
GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily Russel Winder
 
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachJDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachPROIDEA
 

Similaire à Java is dead, long live Scala Kotlin Ceylon etc. (20)

Jax keynote
Jax keynoteJax keynote
Jax keynote
 
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
 
Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution Platform
 
Reflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzReflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz Kabutz
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
 
JRuby in a Java World
JRuby in a Java WorldJRuby in a Java World
JRuby in a Java World
 
Core java programming tutorial - Brainsmartlabs
Core java programming tutorial - BrainsmartlabsCore java programming tutorial - Brainsmartlabs
Core java programming tutorial - Brainsmartlabs
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programming
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Apache Drill (ver. 0.1, check ver. 0.2)
Apache Drill (ver. 0.1, check ver. 0.2)Apache Drill (ver. 0.1, check ver. 0.2)
Apache Drill (ver. 0.1, check ver. 0.2)
 
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěJaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
 
Chapter-1 Introduction.pptx
Chapter-1 Introduction.pptxChapter-1 Introduction.pptx
Chapter-1 Introduction.pptx
 
L1 basics
L1 basicsL1 basics
L1 basics
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorial
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorial
 
GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily
 
Java (1)
Java (1)Java (1)
Java (1)
 
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachJDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
 
Java
JavaJava
Java
 

Plus de Russel Winder

On Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverseOn Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverseRussel Winder
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the WorkshopsRussel Winder
 
Making Computations Execute Very Quickly
Making Computations Execute Very QuicklyMaking Computations Execute Very Quickly
Making Computations Execute Very QuicklyRussel Winder
 
Spocktacular testing
Spocktacular testingSpocktacular testing
Spocktacular testingRussel Winder
 
Spocktacular Testing
Spocktacular TestingSpocktacular Testing
Spocktacular TestingRussel Winder
 
Is Groovy static or dynamic
Is Groovy static or dynamicIs Groovy static or dynamic
Is Groovy static or dynamicRussel Winder
 
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you needDataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you needRussel Winder
 
Are Go and D threats to Python
Are Go and D threats to PythonAre Go and D threats to Python
Are Go and D threats to PythonRussel Winder
 
Is Groovy as fast as Java
Is Groovy as fast as JavaIs Groovy as fast as Java
Is Groovy as fast as JavaRussel Winder
 
Who needs C++ when you have D and Go
Who needs C++ when you have D and GoWho needs C++ when you have D and Go
Who needs C++ when you have D and GoRussel Winder
 
Java 8: a New Beginning
Java 8: a New BeginningJava 8: a New Beginning
Java 8: a New BeginningRussel Winder
 
Why Go is an important programming language
Why Go is an important programming languageWhy Go is an important programming language
Why Go is an important programming languageRussel Winder
 
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaGPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaRussel Winder
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediatelyRussel Winder
 
Given Groovy Who Needs Java
Given Groovy Who Needs JavaGiven Groovy Who Needs Java
Given Groovy Who Needs JavaRussel Winder
 
Testing: Python, Java, Groovy, etc.
Testing: Python, Java, Groovy, etc.Testing: Python, Java, Groovy, etc.
Testing: Python, Java, Groovy, etc.Russel Winder
 
Why Groovy When Java 8 or Scala, or…
Why Groovy When Java 8 or Scala, or…Why Groovy When Java 8 or Scala, or…
Why Groovy When Java 8 or Scala, or…Russel Winder
 

Plus de Russel Winder (20)

On Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverseOn Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverse
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the Workshops
 
Making Computations Execute Very Quickly
Making Computations Execute Very QuicklyMaking Computations Execute Very Quickly
Making Computations Execute Very Quickly
 
GPars Remoting
GPars RemotingGPars Remoting
GPars Remoting
 
GPars 2014
GPars 2014GPars 2014
GPars 2014
 
Spocktacular testing
Spocktacular testingSpocktacular testing
Spocktacular testing
 
Spocktacular Testing
Spocktacular TestingSpocktacular Testing
Spocktacular Testing
 
Is Groovy static or dynamic
Is Groovy static or dynamicIs Groovy static or dynamic
Is Groovy static or dynamic
 
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you needDataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you need
 
Are Go and D threats to Python
Are Go and D threats to PythonAre Go and D threats to Python
Are Go and D threats to Python
 
Is Groovy as fast as Java
Is Groovy as fast as JavaIs Groovy as fast as Java
Is Groovy as fast as Java
 
Who needs C++ when you have D and Go
Who needs C++ when you have D and GoWho needs C++ when you have D and Go
Who needs C++ when you have D and Go
 
Java 8: a New Beginning
Java 8: a New BeginningJava 8: a New Beginning
Java 8: a New Beginning
 
Why Go is an important programming language
Why Go is an important programming languageWhy Go is an important programming language
Why Go is an important programming language
 
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaGPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for Java
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediately
 
GPars Workshop
GPars WorkshopGPars Workshop
GPars Workshop
 
Given Groovy Who Needs Java
Given Groovy Who Needs JavaGiven Groovy Who Needs Java
Given Groovy Who Needs Java
 
Testing: Python, Java, Groovy, etc.
Testing: Python, Java, Groovy, etc.Testing: Python, Java, Groovy, etc.
Testing: Python, Java, Groovy, etc.
 
Why Groovy When Java 8 or Scala, or…
Why Groovy When Java 8 or Scala, or…Why Groovy When Java 8 or Scala, or…
Why Groovy When Java 8 or Scala, or…
 

Dernier

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Dernier (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Java is dead, long live Scala Kotlin Ceylon etc.

  • 1. Copyright © 2014 Russel Winder 1 Java is Dead Long Live Scala, Kotlin, Ceylon, etc. Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk
  • 2. Copyright © 2014 Russel Winder 2 Java is Dead
  • 3. Copyright © 2014 Russel Winder 3 Java is Dying
  • 4. Copyright © 2014 Russel Winder 4 What are the symptoms? ● Java is seriously verbose. ● Java has poor type inference. ● Java has only low-level support for concurrency and parallelism. ● Java generates a dependency hell .“ ” ● Java is a 1990s imperative language that isn't really object-oriented. ● …
  • 5. Copyright © 2014 Russel Winder 5 Is there a cure? ● Can Java: ● Be less verbose. ● Have better type inferencing. ● Do concurrency and parallelism better. (Doug Lea, Brian Goetz and others have actually been doing this for a while.) ● Have a reasonable module system, cf. Jigsaw vs. OSGi. ● Be a real object-oriented language.
  • 6. Copyright © 2014 Russel Winder 6 Prognosis: not great
  • 7. Copyright © 2014 Russel Winder 7 Alternatives?
  • 8. Copyright © 2014 Russel Winder 8 Create a new language ● Java is a statically typed, compiled language, so create a new statically typed compiled language: ● Scala ● Kotlin ● Ceylon ● Fantom ● ?
  • 9. Copyright © 2014 Russel Winder 9 Gross oversimplifications…
  • 10. Copyright © 2014 Russel Winder 10 Scala ● Integrates functional and object-oriented. ● Very declarative style of expression. ● Strong support for data parallelism. Also Akka for actors and such-like. ● Strong static type checking with inferencing and reified generic type parameters.
  • 11. Copyright © 2014 Russel Winder 11 Kotlin ● Top-level functions. ● Object-oriented, with functional elements ● Strong static type checking with inferencing. ● Has modules. ● Allows extension methods. ● Compiles to JavaScript or JVM to support end-to-end Web applications development.
  • 12. Copyright © 2014 Russel Winder 12 Ceylon ● Top-level functions. ● Object oriented with functional features. ● Strong static typing with inference. ● Explicit module system. ● JavaScript and JVM backends so as to be end-to-end for Web applications development.
  • 13. Copyright © 2014 Russel Winder 13 Fantom ● Top-level functions. ● Object-oriented. ● Integrated modules system via pods. ● Targets JVM and CLR.
  • 14. Copyright © 2014 Russel Winder 14 ? The identity of this statically typed, object-oriented (with functional bits) language for the JVM will remain unnamed at this time to preserve the air of mystery and suspense.
  • 15. Copyright © 2014 Russel Winder 15
  • 16. Copyright © 2014 Russel Winder 16 Code!
  • 17. Copyright © 2014 Russel Winder 17
  • 18. Copyright © 2014 Russel Winder 18 
  • 19. Copyright © 2014 Russel Winder 19
  • 20. Copyright © 2014 Russel Winder 20 What is the value of ? Easy, it's known exactly. It's . Obviously.
  • 21. Copyright © 2014 Russel Winder 21 It's simples Александр Орлов 2009
  • 22. Copyright © 2014 Russel Winder 22 Approximating  ● What is it's value represented as a floating point number? ● We can only obtain an approximation. ● A plethora of possible algorithms to choose from, a popular one is to employ the following integral equation.  4 =∫0 1 1 1x2 dx
  • 23. Copyright © 2014 Russel Winder 23 One possible algorithm ● Use quadrature to estimate the value of the integral which is the area under the curve.– = 4 n ∑i=1 n 1 1 i−0.5 n  2 With n = 3 not much to do, but potentially lots of error. Use n = 107 or n = 109 ? Embarrassingly parallel.
  • 24. Copyright © 2014 Russel Winder 24 Because addition is commutative and associative, expression can be decomposed into sums of partial sums.
  • 25. Copyright © 2014 Russel Winder 25 a + b + c + d + e + f = ( a + b ) + ( c + d ) + ( e + f )
  • 26. Copyright © 2014 Russel Winder 26 Scatter Gather— map reduce data parallel
  • 27. Copyright © 2014 Russel Winder 27 Code!
  • 28. Copyright © 2014 Russel Winder 28 Scala Kotlin Ceylon Fantom
  • 29. Copyright © 2014 Russel Winder 29 ?
  • 30. Copyright © 2014 Russel Winder 30 Surprise time…
  • 31. Copyright © 2014 Russel Winder 31 JVM is a Groovy place
  • 32. Copyright © 2014 Russel Winder 32 Groovy ● Top-level functions ● Object-oriented with functional features. ● Extension methods. ● Compiles to JVM bytes codes or JavaScript (cf. GrooScript) ● A dynamic language with a run time meta-object protocol.
  • 33. Copyright © 2014 Russel Winder 33 Groovy A statically typed, compiled language.
  • 34. Copyright © 2014 Russel Winder 34 @TypeChecked @CompileStatic
  • 35. Copyright © 2014 Russel Winder 35 Groovy ● @TypeChecked: ● Traditional dynamic Groovy but with full static (compile-time) type checking. ● @CompileStatic: ● Full static typechecked, compilation to bytecode at compile time. ● No dynamic meta- object protocol.
  • 36. Copyright © 2014 Russel Winder 36 Code!
  • 37. Copyright © 2014 Russel Winder 37
  • 38. Copyright © 2014 Russel Winder 38 Code!
  • 39. Copyright © 2014 Russel Winder 39 Did I mention invokedynamic?
  • 40. Copyright © 2014 Russel Winder 40 Code!
  • 41. Copyright © 2014 Russel Winder 41 Java is Dead!
  • 42. Copyright © 2014 Russel Winder 42 Groovy (or Scala, Kotlin, Ceylon, Fantom, )… is the future of static languages on the JVM.
  • 43. Copyright © 2014 Russel Winder 43 2014-03-18
  • 44. Copyright © 2014 Russel Winder 44 Java 8 Released
  • 45. Copyright © 2014 Russel Winder 45 Java 8 is the biggest revolution in Java since 1994. Bigger than Java 5.
  • 46. Copyright © 2014 Russel Winder 46 Has Java revived? Is this a new lease of life?
  • 47. Copyright © 2014 Russel Winder 47 What's Interesting in Java 8? ● G1 garbage collector. ● Nashorn. ● JavaFX. ● Lambda expressions. ● Default methods in interfaces (traits). ● Enhanced collections.
  • 48. Copyright © 2014 Russel Winder 48 G1 garbage collector is now the standard: no more PermGen.
  • 49. Copyright © 2014 Russel Winder 49 Nashorn comes as standard: Server-side JavaScript without Rhino.
  • 50. Copyright © 2014 Russel Winder 50 JavaFX in the distribution: you will want to use GroovyFX though.
  • 51. Copyright © 2014 Russel Winder 51 Lambda expressions, default methods in interfaces, associated collections enhancements.
  • 52. Copyright © 2014 Russel Winder 52 Code!
  • 53. Copyright © 2014 Russel Winder 53
  • 54. Copyright © 2014 Russel Winder 54 Code!
  • 55. Copyright © 2014 Russel Winder 55 Java is Dead Long Live Scala, Kotlin, Ceylon, etc. Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk
  • 56. Copyright © 2014 Russel Winder 56 Java is Dead Long Live Java Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk
  • 57. Copyright © 2014 Russel Winder 57 Java is Dead Long Live Groovy Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk