SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
Copyright © 2017 Russel Winder 1
The Case for Kotlin and Ceylon
Russel Winder
@russel_winder
russel@winder.org.uk
https://www.russel.org.uk
Copyright © 2017 Russel Winder 2
Java is stagnant,
thankfully we have Kotlin and Ceylon
Russel Winder
@russel_winder
russel@winder.org.uk
https://www.russel.org.uk
Copyright © 2017 Russel Winder 3
The Case for Kotlin and Ceylon
Russel Winder
@russel_winder
russel@winder.org.uk
https://www.russel.org.uk
Copyright © 2017 Russel Winder 4
The “Prosecution” Advocate
● Ex theoretical physicist
● Ex UNIX systems programmer
● Ex academic:
– Parallel programming
– Software development and programming
– HCI, UI, UX
● Ex Company director
● Ex Independent consultant
● Ex analyst
● Ex author
● Ex expert witness
● Ex trainer
Russel Winder
Copyright © 2017 Russel Winder 5
The “Defence” Advocate
Appears to be missing. :-)
The audience will have to substitute.
Copyright © 2017 Russel Winder 6
The Jury
That’s you the audience.
Copyright © 2017 Russel Winder 7
Prologue
Copyright © 2017 Russel Winder 8
An outline case presented,
much, much more detail is available.
Copyright © 2017 Russel Winder 9
Introduction
Copyright © 2017 Russel Winder 10
Java is…
● …an “old” programming language steeped in “imperative” and
“object oriented” history.
● …a programming language, evolving very slowly.
● …not really keeping up with modern programming ideas and
techniques.
Copyright © 2017 Russel Winder 11
The Java Platform is…
● …a mature and extensive hardware-independent platform.
● …evolving very, very slowly.
● …a platform for many programming languages:
– Java, Scala, Kotlin, Ceylon, Frege, Groovy, Fantom, Gosu, …
– Groovy, Clojure, JRuby, Jython, Golo, …
Copyright © 2017 Russel Winder 12
Some Philosophy
Copyright © 2017 Russel Winder 13
Is Change Good?
Copyright © 2017 Russel Winder 14
Is Change Good?
● Change threatens backward compatibility, backward
compatibility is determined to be sacrosanct, ergo no.
● Change enables new knowledge, new techniques, new tools,
ergo yes.
Copyright © 2017 Russel Winder 15
Assembly languages
Procedural languages
Functional languages
Object-oriented languages
?
Logic languages
Machine code
Copyright © 2017 Russel Winder 16
Backward compatibility is the
enemy of progress.
Copyright © 2017 Russel Winder 17
Backward compatibility is the
excuse of the lazy to avoid work.
Copyright © 2017 Russel Winder 18
Backward compatibility is the
way applications become
outdated and broken.
Copyright © 2017 Russel Winder 19
Is backward compatibility the
biggest threat to Java?
Copyright © 2017 Russel Winder 20
Moving On
Copyright © 2017 Russel Winder 21
Distinguish Java the language from
JVM and Java Platform.
Copyright © 2017 Russel Winder 22
If Java will not change…
Copyright © 2017 Russel Winder 23
Assembly languages
Procedural languages
Functional languages
Object-oriented languages
?
Logic languages
Machine code
Copyright © 2017 Russel Winder 24
Scala, touted as a replacement for Java,
incorporates functional programming into an
object oriented language.
However…
Copyright © 2017 Russel Winder 25
Many took to Scala, but
many found it unsatisfactory.
Kotlin and Ceylon are two of the results.
Copyright © 2017 Russel Winder 26
The Two Languages
● Kotlin
– Interwork with Java allowing
incremental change of
codebase.
– Influenced by Java, Groovy,
Scala.
– Superior type system to Java.
● Ceylon
– Replace Java but use the
Java Platform.
– Module based from the
outset.
– Far superior type system to
Java.
Copyright © 2017 Russel Winder 27
Both Kotlin and Ceylon
Can compile to JVM or JavaScript.
Copyright © 2017 Russel Winder 28
Both Kotlin and Ceylon are
languages of the 2010s.
Copyright © 2017 Russel Winder 29
Hello World has to be done
Copyright © 2017 Russel Winder 30
/**
* The Hello World program in Kotlin.
*
* @author Russel Winder
*/
fun main(args:Array<String>) {
println("Hello World.")
}
"The Hello World program in Ceylon."
by("Russel Winder")
shared
void run() {
print("Hello World.");
}
Top level functions.
/**
* The Hello World program in Java
*
* @author Russel Winder
*/
public class HelloWorld_Java {
public static void main(final String[] args) {
System.out.println("Hello World.");
}
}
Copyright © 2017 Russel Winder 31
Doing everything with classes and packages as in Java
(and Scala) seen as too restrictive.
Adding top level functions, etc. seen as right, make the
compiler do the work of creating classes for the JVM.
Copyright © 2017 Russel Winder 32
Factorial is required
Copyright © 2017 Russel Winder 33
Code
Copyright © 2017 Russel Winder 34
Let’s look at anagrams
Or word count
Copyright © 2017 Russel Winder 35
Code
Copyright © 2017 Russel Winder 36
Some Further Thoughts
Copyright © 2017 Russel Winder 37
Operator overloading was deemed too hard for
programmers to cope with by the inventors of Java.
Most JVM languages since have put it back,
one way or another.
Copyright © 2017 Russel Winder 38
Language evolution by replacement.
Copyright © 2017 Russel Winder 39
Kotlin and Ceylon represent two
possible futures on the JVM.
Copyright © 2017 Russel Winder 40
Headlines
● Kotlin:
– More declarative than Java.
– Less code.
– Mixed language codebase.
– More expressive than Java.
● Ceylon:
– More declarative than Java.
– Modules.
– Far better type system
than Java.
– More expressive than Java.
Copyright © 2017 Russel Winder 41
Both Kotlin and Ceylon run on Android.
Copyright © 2017 Russel Winder 42
A Challenge to You
Try all this in Java.
Copyright © 2017 Russel Winder 43
The Case for Kotlin and Ceylon
Russel Winder
@russel_winder
russel@winder.org.uk
https://www.russel.org.uk

Weitere ähnliche Inhalte

Was ist angesagt?

WSO2 Virtual Hackathon Big Data in the Cloud Case Study
WSO2 Virtual Hackathon Big Data in the Cloud Case StudyWSO2 Virtual Hackathon Big Data in the Cloud Case Study
WSO2 Virtual Hackathon Big Data in the Cloud Case StudyLakmal Warusawithana
 
How to Use the TICK Stack, CoreOS, & Docker to Make Your SaaS Offering Better
How to Use the TICK Stack, CoreOS, & Docker to Make Your SaaS Offering BetterHow to Use the TICK Stack, CoreOS, & Docker to Make Your SaaS Offering Better
How to Use the TICK Stack, CoreOS, & Docker to Make Your SaaS Offering BetterDeborah Schalm
 
Post quantum cryptography in vault (hashi talks 2020)
Post quantum cryptography in vault (hashi talks 2020)Post quantum cryptography in vault (hashi talks 2020)
Post quantum cryptography in vault (hashi talks 2020)Mitchell Pronschinske
 
Getting Started with OpenStack from Hong Kong Summit Session November 5
Getting Started with OpenStack from Hong Kong Summit Session November 5Getting Started with OpenStack from Hong Kong Summit Session November 5
Getting Started with OpenStack from Hong Kong Summit Session November 5Niki Acosta
 
UK IPv6 Council Update
UK IPv6 Council UpdateUK IPv6 Council Update
UK IPv6 Council UpdateOliver Müller
 
GitOps (& Flux) for Helm Users with Scott Rigby
GitOps (& Flux) for Helm Users with Scott RigbyGitOps (& Flux) for Helm Users with Scott Rigby
GitOps (& Flux) for Helm Users with Scott RigbyWeaveworks
 

Was ist angesagt? (7)

WSO2 Virtual Hackathon Big Data in the Cloud Case Study
WSO2 Virtual Hackathon Big Data in the Cloud Case StudyWSO2 Virtual Hackathon Big Data in the Cloud Case Study
WSO2 Virtual Hackathon Big Data in the Cloud Case Study
 
How to Use the TICK Stack, CoreOS, & Docker to Make Your SaaS Offering Better
How to Use the TICK Stack, CoreOS, & Docker to Make Your SaaS Offering BetterHow to Use the TICK Stack, CoreOS, & Docker to Make Your SaaS Offering Better
How to Use the TICK Stack, CoreOS, & Docker to Make Your SaaS Offering Better
 
Post quantum cryptography in vault (hashi talks 2020)
Post quantum cryptography in vault (hashi talks 2020)Post quantum cryptography in vault (hashi talks 2020)
Post quantum cryptography in vault (hashi talks 2020)
 
Getting Started with OpenStack from Hong Kong Summit Session November 5
Getting Started with OpenStack from Hong Kong Summit Session November 5Getting Started with OpenStack from Hong Kong Summit Session November 5
Getting Started with OpenStack from Hong Kong Summit Session November 5
 
UK IPv6 Council Update
UK IPv6 Council UpdateUK IPv6 Council Update
UK IPv6 Council Update
 
Agile new context
Agile new contextAgile new context
Agile new context
 
GitOps (& Flux) for Helm Users with Scott Rigby
GitOps (& Flux) for Helm Users with Scott RigbyGitOps (& Flux) for Helm Users with Scott Rigby
GitOps (& Flux) for Helm Users with Scott Rigby
 

Ähnlich wie The Case for Kotlin and Ceylon

MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreMySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreSujatha Sivakumar
 
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
 
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.Russel Winder
 
There's More to Docker than the Container: The Docker Platform - Kendrick Col...
There's More to Docker than the Container: The Docker Platform - Kendrick Col...There's More to Docker than the Container: The Docker Platform - Kendrick Col...
There's More to Docker than the Container: The Docker Platform - Kendrick Col...{code} by Dell EMC
 
Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.Russel Winder
 
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is Dead,  Long Live Ceylon, Kotlin, etcJava is Dead,  Long Live Ceylon, Kotlin, etc
Java is Dead, Long Live Ceylon, Kotlin, etcRussel Winder
 
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | EdurekaWhat Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | EdurekaEdureka!
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL ContainersMatt Lord
 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooRob Tweed
 
MySQL Document Store - when SQL & NoSQL live together... in peace!
MySQL Document Store - when SQL & NoSQL live together... in peace!MySQL Document Store - when SQL & NoSQL live together... in peace!
MySQL Document Store - when SQL & NoSQL live together... in peace!Frederic Descamps
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1Ivan Ma
 
Google does containers: Hello Kubernetes - Steve Wong and Vladimir Vivien - D...
Google does containers: Hello Kubernetes - Steve Wong and Vladimir Vivien - D...Google does containers: Hello Kubernetes - Steve Wong and Vladimir Vivien - D...
Google does containers: Hello Kubernetes - Steve Wong and Vladimir Vivien - D...{code} by Dell EMC
 
Webinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSWebinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSMesosphere Inc.
 
Continous Delivery and Continous Integration at IKERLAN
Continous Delivery and Continous Integration at IKERLANContinous Delivery and Continous Integration at IKERLAN
Continous Delivery and Continous Integration at IKERLANAngel Conde Manjon
 
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
 
The Open Sourcing of Infrastructure
The Open Sourcing of InfrastructureThe Open Sourcing of Infrastructure
The Open Sourcing of InfrastructureAll Things Open
 
Large Scale Cassandra Made Better in Containers - Chris Duchesne and Aaron Sp...
Large Scale Cassandra Made Better in Containers - Chris Duchesne and Aaron Sp...Large Scale Cassandra Made Better in Containers - Chris Duchesne and Aaron Sp...
Large Scale Cassandra Made Better in Containers - Chris Duchesne and Aaron Sp...{code} by Dell EMC
 
Oracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the CloudOracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the CloudEd Burns
 
How to build Sdk? Best practices
How to build Sdk? Best practicesHow to build Sdk? Best practices
How to build Sdk? Best practicesVitali Pekelis
 

Ähnlich wie The Case for Kotlin and Ceylon (20)

MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreMySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
 
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
 
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.
 
There's More to Docker than the Container: The Docker Platform - Kendrick Col...
There's More to Docker than the Container: The Docker Platform - Kendrick Col...There's More to Docker than the Container: The Docker Platform - Kendrick Col...
There's More to Docker than the Container: The Docker Platform - Kendrick Col...
 
Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.
 
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is Dead,  Long Live Ceylon, Kotlin, etcJava is Dead,  Long Live Ceylon, Kotlin, etc
Java is Dead, Long Live Ceylon, Kotlin, etc
 
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | EdurekaWhat Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It Too
 
MySQL Document Store - when SQL & NoSQL live together... in peace!
MySQL Document Store - when SQL & NoSQL live together... in peace!MySQL Document Store - when SQL & NoSQL live together... in peace!
MySQL Document Store - when SQL & NoSQL live together... in peace!
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 
Google does containers: Hello Kubernetes - Steve Wong and Vladimir Vivien - D...
Google does containers: Hello Kubernetes - Steve Wong and Vladimir Vivien - D...Google does containers: Hello Kubernetes - Steve Wong and Vladimir Vivien - D...
Google does containers: Hello Kubernetes - Steve Wong and Vladimir Vivien - D...
 
Webinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSWebinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OS
 
Continous Delivery and Continous Integration at IKERLAN
Continous Delivery and Continous Integration at IKERLANContinous Delivery and Continous Integration at IKERLAN
Continous Delivery and Continous Integration at IKERLAN
 
Zero to flow
Zero to flowZero to flow
Zero to flow
 
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 -...
 
The Open Sourcing of Infrastructure
The Open Sourcing of InfrastructureThe Open Sourcing of Infrastructure
The Open Sourcing of Infrastructure
 
Large Scale Cassandra Made Better in Containers - Chris Duchesne and Aaron Sp...
Large Scale Cassandra Made Better in Containers - Chris Duchesne and Aaron Sp...Large Scale Cassandra Made Better in Containers - Chris Duchesne and Aaron Sp...
Large Scale Cassandra Made Better in Containers - Chris Duchesne and Aaron Sp...
 
Oracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the CloudOracle Code Online: Building a Serverless State Service for the Cloud
Oracle Code Online: Building a Serverless State Service for the Cloud
 
How to build Sdk? Best practices
How to build Sdk? Best practicesHow to build Sdk? Best practices
How to build Sdk? Best practices
 

Mehr von Russel Winder

Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the WorkshopsRussel 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
 
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)

Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the Workshops
 
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
 
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

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[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
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
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
 
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
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[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
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
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
 
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 Case for Kotlin and Ceylon

  • 1. Copyright © 2017 Russel Winder 1 The Case for Kotlin and Ceylon Russel Winder @russel_winder russel@winder.org.uk https://www.russel.org.uk
  • 2. Copyright © 2017 Russel Winder 2 Java is stagnant, thankfully we have Kotlin and Ceylon Russel Winder @russel_winder russel@winder.org.uk https://www.russel.org.uk
  • 3. Copyright © 2017 Russel Winder 3 The Case for Kotlin and Ceylon Russel Winder @russel_winder russel@winder.org.uk https://www.russel.org.uk
  • 4. Copyright © 2017 Russel Winder 4 The “Prosecution” Advocate ● Ex theoretical physicist ● Ex UNIX systems programmer ● Ex academic: – Parallel programming – Software development and programming – HCI, UI, UX ● Ex Company director ● Ex Independent consultant ● Ex analyst ● Ex author ● Ex expert witness ● Ex trainer Russel Winder
  • 5. Copyright © 2017 Russel Winder 5 The “Defence” Advocate Appears to be missing. :-) The audience will have to substitute.
  • 6. Copyright © 2017 Russel Winder 6 The Jury That’s you the audience.
  • 7. Copyright © 2017 Russel Winder 7 Prologue
  • 8. Copyright © 2017 Russel Winder 8 An outline case presented, much, much more detail is available.
  • 9. Copyright © 2017 Russel Winder 9 Introduction
  • 10. Copyright © 2017 Russel Winder 10 Java is… ● …an “old” programming language steeped in “imperative” and “object oriented” history. ● …a programming language, evolving very slowly. ● …not really keeping up with modern programming ideas and techniques.
  • 11. Copyright © 2017 Russel Winder 11 The Java Platform is… ● …a mature and extensive hardware-independent platform. ● …evolving very, very slowly. ● …a platform for many programming languages: – Java, Scala, Kotlin, Ceylon, Frege, Groovy, Fantom, Gosu, … – Groovy, Clojure, JRuby, Jython, Golo, …
  • 12. Copyright © 2017 Russel Winder 12 Some Philosophy
  • 13. Copyright © 2017 Russel Winder 13 Is Change Good?
  • 14. Copyright © 2017 Russel Winder 14 Is Change Good? ● Change threatens backward compatibility, backward compatibility is determined to be sacrosanct, ergo no. ● Change enables new knowledge, new techniques, new tools, ergo yes.
  • 15. Copyright © 2017 Russel Winder 15 Assembly languages Procedural languages Functional languages Object-oriented languages ? Logic languages Machine code
  • 16. Copyright © 2017 Russel Winder 16 Backward compatibility is the enemy of progress.
  • 17. Copyright © 2017 Russel Winder 17 Backward compatibility is the excuse of the lazy to avoid work.
  • 18. Copyright © 2017 Russel Winder 18 Backward compatibility is the way applications become outdated and broken.
  • 19. Copyright © 2017 Russel Winder 19 Is backward compatibility the biggest threat to Java?
  • 20. Copyright © 2017 Russel Winder 20 Moving On
  • 21. Copyright © 2017 Russel Winder 21 Distinguish Java the language from JVM and Java Platform.
  • 22. Copyright © 2017 Russel Winder 22 If Java will not change…
  • 23. Copyright © 2017 Russel Winder 23 Assembly languages Procedural languages Functional languages Object-oriented languages ? Logic languages Machine code
  • 24. Copyright © 2017 Russel Winder 24 Scala, touted as a replacement for Java, incorporates functional programming into an object oriented language. However…
  • 25. Copyright © 2017 Russel Winder 25 Many took to Scala, but many found it unsatisfactory. Kotlin and Ceylon are two of the results.
  • 26. Copyright © 2017 Russel Winder 26 The Two Languages ● Kotlin – Interwork with Java allowing incremental change of codebase. – Influenced by Java, Groovy, Scala. – Superior type system to Java. ● Ceylon – Replace Java but use the Java Platform. – Module based from the outset. – Far superior type system to Java.
  • 27. Copyright © 2017 Russel Winder 27 Both Kotlin and Ceylon Can compile to JVM or JavaScript.
  • 28. Copyright © 2017 Russel Winder 28 Both Kotlin and Ceylon are languages of the 2010s.
  • 29. Copyright © 2017 Russel Winder 29 Hello World has to be done
  • 30. Copyright © 2017 Russel Winder 30 /** * The Hello World program in Kotlin. * * @author Russel Winder */ fun main(args:Array<String>) { println("Hello World.") } "The Hello World program in Ceylon." by("Russel Winder") shared void run() { print("Hello World."); } Top level functions. /** * The Hello World program in Java * * @author Russel Winder */ public class HelloWorld_Java { public static void main(final String[] args) { System.out.println("Hello World."); } }
  • 31. Copyright © 2017 Russel Winder 31 Doing everything with classes and packages as in Java (and Scala) seen as too restrictive. Adding top level functions, etc. seen as right, make the compiler do the work of creating classes for the JVM.
  • 32. Copyright © 2017 Russel Winder 32 Factorial is required
  • 33. Copyright © 2017 Russel Winder 33 Code
  • 34. Copyright © 2017 Russel Winder 34 Let’s look at anagrams Or word count
  • 35. Copyright © 2017 Russel Winder 35 Code
  • 36. Copyright © 2017 Russel Winder 36 Some Further Thoughts
  • 37. Copyright © 2017 Russel Winder 37 Operator overloading was deemed too hard for programmers to cope with by the inventors of Java. Most JVM languages since have put it back, one way or another.
  • 38. Copyright © 2017 Russel Winder 38 Language evolution by replacement.
  • 39. Copyright © 2017 Russel Winder 39 Kotlin and Ceylon represent two possible futures on the JVM.
  • 40. Copyright © 2017 Russel Winder 40 Headlines ● Kotlin: – More declarative than Java. – Less code. – Mixed language codebase. – More expressive than Java. ● Ceylon: – More declarative than Java. – Modules. – Far better type system than Java. – More expressive than Java.
  • 41. Copyright © 2017 Russel Winder 41 Both Kotlin and Ceylon run on Android.
  • 42. Copyright © 2017 Russel Winder 42 A Challenge to You Try all this in Java.
  • 43. Copyright © 2017 Russel Winder 43 The Case for Kotlin and Ceylon Russel Winder @russel_winder russel@winder.org.uk https://www.russel.org.uk