SlideShare ist ein Scribd-Unternehmen logo
1 von 61
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Fast Python? Don't Bother
Fast Python? Don't BotherFast Python? Don't Bother
Fast Python? Don't BotherRussel 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 2013dotCloud
 
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 CodeQAware 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 1Ruslan 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 GraalVMQAware GmbH
 
The Road to Kubernetes
The Road to KubernetesThe Road to Kubernetes
The Road to KubernetesDeniz 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 ContainersDivakar 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 applicationsCesar 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 MeetupShannon 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 nightLuciano Mammino
 
DevOps from the Provider Perspective
DevOps from the Provider PerspectiveDevOps from the Provider Perspective
DevOps from the Provider PerspectivePat Patterson
 

Was ist angesagt? (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
 

Ähnlich wie Java is dead, long live Scala, Kotlin, Ceylon, etc.

Reflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzReflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzJAXLondon2014
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programmingbusiness 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 TooRob Tweed
 
Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformThomas Wuerthinger
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java ProgrammingRavi Kant Sahu
 
JRuby in a Java World
JRuby in a Java WorldJRuby in a Java World
JRuby in a Java WorldMark Menard
 
Polyglot Applications with GraalVM
Polyglot Applications with GraalVMPolyglot Applications with GraalVM
Polyglot Applications with GraalVMjexp
 
Java 8: a New Beginning
Java 8: a New BeginningJava 8: a New Beginning
Java 8: a New BeginningRussel Winder
 
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderDataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winderploibl
 
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderDataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderJAXLondon2014
 
Core java programming tutorial - Brainsmartlabs
Core java programming tutorial - BrainsmartlabsCore java programming tutorial - Brainsmartlabs
Core java programming tutorial - Brainsmartlabsbrainsmartlabsedu
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the WorkshopsRussel 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.pptxSumanBhandari40
 

Ähnlich wie 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
 

Mehr von 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
 
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
 
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
 
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…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
 
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 JavaRussel Winder
 

Mehr von 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
 

Kürzlich hochgeladen

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

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