…from a java developer's point of view · kotlin: a little bit of history it’s an island...

24
…from a Java developer's point of view

Upload: others

Post on 14-Oct-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

…from a Java developer's point of view

Page 2: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

Marc Reichelt

@mreichelt

Page 3: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

Java, 2019

Page 4: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

Java gets the job done™

Lots of developers

Write Once, Run Anywhere

Lots of libraries and tools

Good IDEs (IntelliJ, Eclipse, …)

Easier than other (older) programming languages

Strong ecosystem

Page 5: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

Java: The bad stuff

No true protection against NullPointerExceptions

Data classes only with bytecode manipulators + IDE Plugins

Easy features aren’t easy - ever tried to read a file into a String or bytearray?

Best practices not built into language - Singletons, getters+setters, lazy object creation, Builder Patterns…

Checked exceptions

Oracle (license politics)

Write Once, Run Anywhere - what about iOS & the web?

Legacy: “Forced” OOP, C-style switch, Integer vs. int, equals vs. ==Functional Programming,

retrofittedUpgradability

Concurrent Programming: heavyweight threads

Page 6: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

What If?

● …we would rethink Java today, with our learnings on Java legacy?

● …easy to learn for Java developers and fresh coders?

● …with excellent IDE support?

● …combined with the best features of other languages?

● …truly running on all systems?

● …coding would suddenly make fun again?

● …supported by a strong and friendly community?

● …compatible with the JVM?

Page 7: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 8: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

Kotlin: A little bit of history

● It’s an island as well

● 2011: Created by JetBrains○ They looked for a new language, but Scala had a slow compiler

○ Java didn’t make it due to backward-compatibility

● 2016: Kotlin 1.0

● 2017: Google announced official Kotlin support

● 2019: Google announces ‘Kotlin first’

★ 2.2 million Kotlin developers in 2018 (Java: 7.1m)

Page 9: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

That’s nice, Marc!Now let’s see the

good stuff…

Page 10: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 11: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 12: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 13: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

©ite

ratec

©ite

ratec

13

Page 14: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 15: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 16: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 17: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 18: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 19: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

// Java

Page 20: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 21: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow
Page 22: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

Demo time!

Page 23: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

One more thing…

JVM LLVM JS

Page 24: …from a Java developer's point of view · Kotlin: A little bit of history It’s an island as well 2011: Created by JetBrains They looked for a new language, but Scala had a slow

…from a Java developer's point of view

Marc Reichelt

@mreichelt