SlideShare a Scribd company logo
Copyright © 2014 Russel Winder 1
Java is Dead
Long Live Scala, Kotlin, Ceylon,
etc.
Russel Winder
email: 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
● Gosu
● ?
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
Gosu
● Top-level functions.
● Object-oriented.
● Scripts.
Copyright © 2014 Russel Winder 15
?
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 16
Copyright © 2014 Russel Winder 17
Code!
Copyright © 2014 Russel Winder 18
Copyright © 2014 Russel Winder 19

Copyright © 2014 Russel Winder 20
Copyright © 2014 Russel Winder 21
What is the value of ?
Copyright © 2014 Russel Winder 22
Well that's easy, it's…
Copyright © 2014 Russel Winder 23

Copyright © 2014 Russel Winder 24
Obviously.
Copyright © 2014 Russel Winder 25
It's simples
Александр Орлов 2009
Copyright © 2014 Russel Winder 26
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 27
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 28
Because addition is commutative and
associative, expression can be
decomposed into sums of partial sums.
Copyright © 2014 Russel Winder 29
a + b + c + d + e + f
=
( a + b ) + ( c + d ) + ( e + f )
Copyright © 2014 Russel Winder 30
Scatter Gather—
map reduce
data parallel
Copyright © 2014 Russel Winder 31
Code!
Copyright © 2014 Russel Winder 32
Scala
Kotlin
Ceylon
Copyright © 2014 Russel Winder 33
?
Copyright © 2014 Russel Winder 34
Surprise time…
Copyright © 2014 Russel Winder 35
JVM is a Groovy place
Copyright © 2014 Russel Winder 36
Groovy
● Top-level functions.
● Object-oriented with
functional features.
● Extension methods.
● Compiles to JVM bytes
codes or JavaScript,
cf. GrooScript.
● Runs on Android.
● Scripts.
● A dynamic language
with a run time
meta-object protocol.
Copyright © 2014 Russel Winder 37
Groovy
A statically typed,
compiled language.
Copyright © 2014 Russel Winder 38
@TypeChecked
@CompileStatic
Copyright © 2014 Russel Winder 39
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 40
Code!
Copyright © 2014 Russel Winder 41
Copyright © 2014 Russel Winder 42
Code!
Copyright © 2014 Russel Winder 43
Did I mention invokedynamic?
Copyright © 2014 Russel Winder 44
Code!
Copyright © 2014 Russel Winder 45
Java is Dead!
Copyright © 2014 Russel Winder 46
Groovy
(or Scala, Kotlin, Ceylon, Fantom, )…
is the future of static languages
on the JVM.
Copyright © 2014 Russel Winder 47
2014-03-18
Copyright © 2014 Russel Winder 48
Java 8
Released
Copyright © 2014 Russel Winder 49
Java 8 is the biggest revolution
in Java since 1994.
Bigger than Java 5.
Copyright © 2014 Russel Winder 50
Has Java revived?
Is this a new lease of life?
Copyright © 2014 Russel Winder 51
What's Interesting in Java 8?
● G1 garbage collector.
● Nashorn.
● JavaFX.
● Lambda expressions.
● Default methods in
interfaces (traits).
● Enhanced collections.
● Method references.
Copyright © 2014 Russel Winder 52
G1 garbage collector is now the
standard: no more PermGen.
Copyright © 2014 Russel Winder 53
Nashorn comes as standard:
Server-side JavaScript without Rhino.
Copyright © 2014 Russel Winder 54
JavaFX in the distribution:
you will want to use GroovyFX though.
Copyright © 2014 Russel Winder 55
Lambda expressions,
default methods in interfaces,
associated collections enhancements.
Copyright © 2014 Russel Winder 56
Code!
Copyright © 2014 Russel Winder 57
Copyright © 2014 Russel Winder 58
Code!
Copyright © 2014 Russel Winder 59
Java is Dead
Long Live Scala, Kotlin, Ceylon,
etc.
Russel Winder
email: russel@winder.org.uk
twitter: @russel_winder
Web: http://www.russel.org.uk
Copyright © 2014 Russel Winder 60
Java is Dead
Long Live Java
Russel Winder
email: russel@winder.org.uk
twitter: @russel_winder
Web: http://www.russel.org.uk
Copyright © 2014 Russel Winder 61
Java is Dead
Long Live Groovy
Russel Winder
email: russel@winder.org.uk
twitter: @russel_winder
Web: http://www.russel.org.uk

More Related Content

What's hot

Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Carlos Badenes-Olmedo
 
Fast Python? Don't Bother
Fast Python? Don't BotherFast Python? Don't Bother
Fast Python? Don't Bother
Russel Winder
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
Timed Text At Netflix
Timed Text At NetflixTimed Text At Netflix
Timed Text At NetflixRohit Puri
 
Clean Infrastructure as Code
Clean Infrastructure as CodeClean Infrastructure as Code
Clean Infrastructure as Code
QAware GmbH
 
Eclipse Modeling Guided Tour - Acceleo Query Language (AQL)
Eclipse Modeling Guided Tour - Acceleo Query Language (AQL)Eclipse Modeling Guided Tour - Acceleo Query Language (AQL)
Eclipse Modeling Guided Tour - Acceleo Query Language (AQL)
Cédric Brun
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
Ruslan Meshenberg
 
Declarative Import with Magento 2 Import Framework (M2IF)
Declarative Import with Magento 2 Import Framework (M2IF)Declarative Import with Magento 2 Import Framework (M2IF)
Declarative Import with Magento 2 Import Framework (M2IF)
Tim Wagner
 
Efficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVMEfficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVM
QAware GmbH
 
The Road to Kubernetes
The Road to KubernetesThe Road to Kubernetes
The Road to Kubernetes
Deniz Zoeteman
 
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Shannon Williams
 
A basic overview of Containers
A basic overview of ContainersA basic overview of Containers
A basic overview of Containers
Divakar Sharma
 
More tips and tricks for running containers like a pro - Rancher Online MEetu...
More tips and tricks for running containers like a pro - Rancher Online MEetu...More tips and tricks for running containers like a pro - Rancher Online MEetu...
More tips and tricks for running containers like a pro - Rancher Online MEetu...
Shannon Williams
 
Swift on the Server
Swift on the Server Swift on the Server
Swift on the Server
Dev_Events
 
PyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applicationsPyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applications
Cesar Cardenas Desales
 
Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Storage for containers and cloud-native deployments - Rancher Online Meetup -...Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Shannon Williams
 
Introducing Project Longhorn - April 2016 Rancher Online Meetup
Introducing Project Longhorn - April 2016 Rancher Online MeetupIntroducing Project Longhorn - April 2016 Rancher Online Meetup
Introducing Project Longhorn - April 2016 Rancher Online Meetup
Shannon Williams
 
Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"
Fwdays
 
Processing TeraBytes of data every day and sleeping at night
Processing TeraBytes of data every day and sleeping at nightProcessing TeraBytes of data every day and sleeping at night
Processing TeraBytes of data every day and sleeping at night
Luciano Mammino
 
DevOps from the Provider Perspective
DevOps from the Provider PerspectiveDevOps from the Provider Perspective
DevOps from the Provider Perspective
Pat Patterson
 

What's hot (20)

Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Fast Python? Don't Bother
Fast Python? Don't BotherFast Python? Don't Bother
Fast Python? Don't Bother
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
 
Timed Text At Netflix
Timed Text At NetflixTimed Text At Netflix
Timed Text At Netflix
 
Clean Infrastructure as Code
Clean Infrastructure as CodeClean Infrastructure as Code
Clean Infrastructure as Code
 
Eclipse Modeling Guided Tour - Acceleo Query Language (AQL)
Eclipse Modeling Guided Tour - Acceleo Query Language (AQL)Eclipse Modeling Guided Tour - Acceleo Query Language (AQL)
Eclipse Modeling Guided Tour - Acceleo Query Language (AQL)
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Declarative Import with Magento 2 Import Framework (M2IF)
Declarative Import with Magento 2 Import Framework (M2IF)Declarative Import with Magento 2 Import Framework (M2IF)
Declarative Import with Magento 2 Import Framework (M2IF)
 
Efficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVMEfficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVM
 
The Road to Kubernetes
The Road to KubernetesThe Road to Kubernetes
The Road to Kubernetes
 
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
 
A basic overview of Containers
A basic overview of ContainersA basic overview of Containers
A basic overview of Containers
 
More tips and tricks for running containers like a pro - Rancher Online MEetu...
More tips and tricks for running containers like a pro - Rancher Online MEetu...More tips and tricks for running containers like a pro - Rancher Online MEetu...
More tips and tricks for running containers like a pro - Rancher Online MEetu...
 
Swift on the Server
Swift on the Server Swift on the Server
Swift on the Server
 
PyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applicationsPyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applications
 
Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Storage for containers and cloud-native deployments - Rancher Online Meetup -...Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Storage for containers and cloud-native deployments - Rancher Online Meetup -...
 
Introducing Project Longhorn - April 2016 Rancher Online Meetup
Introducing Project Longhorn - April 2016 Rancher Online MeetupIntroducing Project Longhorn - April 2016 Rancher Online Meetup
Introducing Project Longhorn - April 2016 Rancher Online Meetup
 
Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"
 
Processing TeraBytes of data every day and sleeping at night
Processing TeraBytes of data every day and sleeping at nightProcessing TeraBytes of data every day and sleeping at night
Processing TeraBytes of data every day and sleeping at night
 
DevOps from the Provider Perspective
DevOps from the Provider PerspectiveDevOps from the Provider Perspective
DevOps from the Provider Perspective
 

Similar to Java is dead, long live Scala, Kotlin, Ceylon, etc.

Jax keynote
Jax keynoteJax keynote
Jax keynote
Marcus Lagergren
 
Reflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzReflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz Kabutz
JAXLondon2014
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programming
business Corporate
 
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
Rob Tweed
 
Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution Platform
Thomas Wuerthinger
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
Ravi Kant Sahu
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
Salahaddin University-Erbil
 
JRuby in a Java World
JRuby in a Java WorldJRuby in a Java World
JRuby in a Java World
Mark Menard
 
Polyglot Applications with GraalVM
Polyglot Applications with GraalVMPolyglot Applications with GraalVM
Polyglot Applications with GraalVM
jexp
 
Java 8: a New Beginning
Java 8: a New BeginningJava 8: a New Beginning
Java 8: a New Beginning
Russel Winder
 
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderDataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
JAXLondon2014
 
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderDataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
ploibl
 
Core java programming tutorial - Brainsmartlabs
Core java programming tutorial - BrainsmartlabsCore java programming tutorial - Brainsmartlabs
Core java programming tutorial - Brainsmartlabs
brainsmartlabsedu
 
L1 basics
L1 basicsL1 basics
L1 basics
teach4uin
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the Workshops
Russel Winder
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorialtutorialsruby
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorialtutorialsruby
 
Chapter-1 Introduction.pptx
Chapter-1 Introduction.pptxChapter-1 Introduction.pptx
Chapter-1 Introduction.pptx
SumanBhandari40
 

Similar to Java is dead, long live Scala, Kotlin, Ceylon, etc. (20)

Jax keynote
Jax keynoteJax keynote
Jax keynote
 
Reflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzReflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz Kabutz
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programming
 
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
 
Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution Platform
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
 
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...
 
JRuby in a Java World
JRuby in a Java WorldJRuby in a Java World
JRuby in a Java World
 
Polyglot Applications with GraalVM
Polyglot Applications with GraalVMPolyglot Applications with GraalVM
Polyglot Applications with GraalVM
 
Java 8: a New Beginning
Java 8: a New BeginningJava 8: a New Beginning
Java 8: a New Beginning
 
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderDataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
 
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderDataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
 
Core java programming tutorial - Brainsmartlabs
Core java programming tutorial - BrainsmartlabsCore java programming tutorial - Brainsmartlabs
Core java programming tutorial - Brainsmartlabs
 
L1 basics
L1 basicsL1 basics
L1 basics
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the Workshops
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorial
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorial
 
Java (1)
Java (1)Java (1)
Java (1)
 
Chapter-1 Introduction.pptx
Chapter-1 Introduction.pptxChapter-1 Introduction.pptx
Chapter-1 Introduction.pptx
 

More from 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 JVMverse
Russel Winder
 
Making Computations Execute Very Quickly
Making Computations Execute Very QuicklyMaking Computations Execute Very Quickly
Making Computations Execute Very Quickly
Russel Winder
 
GPars Remoting
GPars RemotingGPars Remoting
GPars Remoting
Russel Winder
 
GPars 2014
GPars 2014GPars 2014
GPars 2014
Russel Winder
 
Spocktacular testing
Spocktacular testingSpocktacular testing
Spocktacular testing
Russel Winder
 
Spocktacular Testing
Spocktacular TestingSpocktacular Testing
Spocktacular Testing
Russel Winder
 
Is Groovy static or dynamic
Is Groovy static or dynamicIs Groovy static or dynamic
Is Groovy static or dynamic
Russel 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 need
Russel 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 Python
Russel Winder
 
Is Groovy as fast as Java
Is Groovy as fast as JavaIs Groovy as fast as Java
Is Groovy as fast as Java
Russel 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 Go
Russel 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 language
Russel Winder
 
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaGPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for Java
Russel Winder
 
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
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediately
Russel Winder
 
GPars Workshop
GPars WorkshopGPars Workshop
GPars Workshop
Russel Winder
 
Given Groovy Who Needs Java
Given Groovy Who Needs JavaGiven Groovy Who Needs Java
Given Groovy Who Needs Java
Russel 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
 
Closures: The Next "Big Thing" In Java
Closures: The Next "Big Thing" In JavaClosures: The Next "Big Thing" In Java
Closures: The Next "Big Thing" In Java
Russel Winder
 

More from 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
 
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
 
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
 
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
 
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…
 
Closures: The Next "Big Thing" In Java
Closures: The Next "Big Thing" In JavaClosures: The Next "Big Thing" In Java
Closures: The Next "Big Thing" In Java
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 

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 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 ● Gosu ● ?
  • 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 Gosu ● Top-level functions. ● Object-oriented. ● Scripts.
  • 15. Copyright © 2014 Russel Winder 15 ? 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.
  • 16. Copyright © 2014 Russel Winder 16
  • 17. Copyright © 2014 Russel Winder 17 Code!
  • 18. Copyright © 2014 Russel Winder 18
  • 19. Copyright © 2014 Russel Winder 19 
  • 20. Copyright © 2014 Russel Winder 20
  • 21. Copyright © 2014 Russel Winder 21 What is the value of ?
  • 22. Copyright © 2014 Russel Winder 22 Well that's easy, it's…
  • 23. Copyright © 2014 Russel Winder 23 
  • 24. Copyright © 2014 Russel Winder 24 Obviously.
  • 25. Copyright © 2014 Russel Winder 25 It's simples Александр Орлов 2009
  • 26. Copyright © 2014 Russel Winder 26 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
  • 27. Copyright © 2014 Russel Winder 27 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.
  • 28. Copyright © 2014 Russel Winder 28 Because addition is commutative and associative, expression can be decomposed into sums of partial sums.
  • 29. Copyright © 2014 Russel Winder 29 a + b + c + d + e + f = ( a + b ) + ( c + d ) + ( e + f )
  • 30. Copyright © 2014 Russel Winder 30 Scatter Gather— map reduce data parallel
  • 31. Copyright © 2014 Russel Winder 31 Code!
  • 32. Copyright © 2014 Russel Winder 32 Scala Kotlin Ceylon
  • 33. Copyright © 2014 Russel Winder 33 ?
  • 34. Copyright © 2014 Russel Winder 34 Surprise time…
  • 35. Copyright © 2014 Russel Winder 35 JVM is a Groovy place
  • 36. Copyright © 2014 Russel Winder 36 Groovy ● Top-level functions. ● Object-oriented with functional features. ● Extension methods. ● Compiles to JVM bytes codes or JavaScript, cf. GrooScript. ● Runs on Android. ● Scripts. ● A dynamic language with a run time meta-object protocol.
  • 37. Copyright © 2014 Russel Winder 37 Groovy A statically typed, compiled language.
  • 38. Copyright © 2014 Russel Winder 38 @TypeChecked @CompileStatic
  • 39. Copyright © 2014 Russel Winder 39 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.
  • 40. Copyright © 2014 Russel Winder 40 Code!
  • 41. Copyright © 2014 Russel Winder 41
  • 42. Copyright © 2014 Russel Winder 42 Code!
  • 43. Copyright © 2014 Russel Winder 43 Did I mention invokedynamic?
  • 44. Copyright © 2014 Russel Winder 44 Code!
  • 45. Copyright © 2014 Russel Winder 45 Java is Dead!
  • 46. Copyright © 2014 Russel Winder 46 Groovy (or Scala, Kotlin, Ceylon, Fantom, )… is the future of static languages on the JVM.
  • 47. Copyright © 2014 Russel Winder 47 2014-03-18
  • 48. Copyright © 2014 Russel Winder 48 Java 8 Released
  • 49. Copyright © 2014 Russel Winder 49 Java 8 is the biggest revolution in Java since 1994. Bigger than Java 5.
  • 50. Copyright © 2014 Russel Winder 50 Has Java revived? Is this a new lease of life?
  • 51. Copyright © 2014 Russel Winder 51 What's Interesting in Java 8? ● G1 garbage collector. ● Nashorn. ● JavaFX. ● Lambda expressions. ● Default methods in interfaces (traits). ● Enhanced collections. ● Method references.
  • 52. Copyright © 2014 Russel Winder 52 G1 garbage collector is now the standard: no more PermGen.
  • 53. Copyright © 2014 Russel Winder 53 Nashorn comes as standard: Server-side JavaScript without Rhino.
  • 54. Copyright © 2014 Russel Winder 54 JavaFX in the distribution: you will want to use GroovyFX though.
  • 55. Copyright © 2014 Russel Winder 55 Lambda expressions, default methods in interfaces, associated collections enhancements.
  • 56. Copyright © 2014 Russel Winder 56 Code!
  • 57. Copyright © 2014 Russel Winder 57
  • 58. Copyright © 2014 Russel Winder 58 Code!
  • 59. Copyright © 2014 Russel Winder 59 Java is Dead Long Live Scala, Kotlin, Ceylon, etc. Russel Winder email: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk
  • 60. Copyright © 2014 Russel Winder 60 Java is Dead Long Live Java Russel Winder email: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk
  • 61. Copyright © 2014 Russel Winder 61 Java is Dead Long Live Groovy Russel Winder email: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk