Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in...

74
Kotlin 1.4 Online Event October 12, 2020 Opening Keynote @kotlin @jetbrains

Transcript of Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in...

Page 1: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin 1.4 Online Event

October 12, 2020

OpeningKeynote

@kotlin@jetbrains

Page 2: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Egor Tolstoy

Speakers

Stanislav Erokhin Svetlana Isakova Roman ElizarovProduct Management Development Developer Advocacy Language Research

Anastasia KapaninaProduct Manager forKotlin Multiplatform Mobile

Page 3: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin 1.4.10

Page 4: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin 1.5

Quality Performance

Server-side KMM

Priorities

spring 2021

Page 5: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin ecosystem = people + ideas + software

Page 6: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

CommunityGrowth Egor Tolstoy

@igrekde

Page 7: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Total yearly users

2017 2018

5.5M

2018 2019 2019 2020

1.0M

4.0M

2.5M

3.5M

Number of people who have edited Kotlin code in the last 12 months 5.8M

1M

Page 8: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana
Page 9: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Active yearly users

2017 2018

1.2M

2018 2019 2019 2020

800K

400K

1.227M

804K

352K

Number of people who regularly edit Kotlin code in the last 12 months

Page 10: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Community

And many more!

Toshiaki Kameyama800 PR ⤴ on GitHub

Google Compiler Teammore than 900 commits ☑ in Kotlin compiler

Cedric Beustmaintainer of the Klaxon library with 1.5k 🌟

Florina Muntenescublogs about Kotlin for 15.7k followers 👩🏻‍💻

Igor Wojda145 tickets ✏ in YouTrack

Márton Braun700 answers 💬 on Stack Overflow

Page 11: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Stack Overflow growth

20K

2019 2020

5K

15K

10K

2018 20192017 2018

8.4K

12.7K

19.5KAnswers

Page 12: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

GitHub growth

200K

50K

150K

100K

2019 20202018 20192017 2018

181.8K

100K

55.8K

New Kotlin projects

Page 13: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Community numbers

SlackRedditTwitterUser groups

32K37K94K200

Page 14: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Egor TolstoyHead of Product Management

Contributing to KotlinStaying in Touch)

Page 15: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Performance & Quality

Page 16: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana
Page 17: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana
Page 18: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana
Page 19: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

0200 ms

70%

200500 ms 1000 ms

10%

50%

30%

70.3%

5001000 ms

58.4%

25.1%

34.0%

3.2%5.7%1.3%1.8%

CurrentPrevious Code completion speed

Based on anonymous usage statistics

Page 20: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

30

90% 99%

5

20

10

95%*

31.7

Highlighting times in large Kotlin files

15.712.6

6.23.9

8.2

CurrentPrevious

Seconds

* 95th percentile means that in 95% of cases highlighting time is less than 6.2s

Page 21: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Anton YalyshevProduct Manager in IntelliJ Kotlin plugin

Kotlin 1.4 in IntelliJ-based IDEs:Boosting Quality and Performance

Page 22: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Project import process performance

Scripting performance and stability

Navigation and Find Usages speed

Faster Kotlin / Native compilation

Quality of cross-language refactorings

Kotlin / Native disk footprint improvements

Gradle incremental compilation performance

UltraLight classes to accelerate Java / Kotlin interop

Typing / completion /highlighting speed

Page 23: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

New compilerfrontend

Project import process performance

Scripting performance and stability

Navigation and Find Usages speed

Faster Kotlin / Native compilation

Quality of cross-language refactorings

Kotlin / Native disk footprint improvements

Gradle incremental compilation performance

UltraLight classes to accelerate Java / Kotlin interop

Typing / completion /highlighting speed

Page 24: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

New Compiler Stanislav Erokhin

Page 25: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

New compiler

◇ Pluggable○ Uniform ⇒ Fast

Page 26: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin compiler

Frontend Backend

fun foo() = ...

*.kt fun main() = foo()*.js*.class*.so

Page 27: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Frontend

Expected speed improvementswith new frontend

Old compiler New compiler

Frontend

Backend

Frontend

Backend

4.5 times faster

Not in 1.5

Page 28: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Reworked type inferenceStable in Kotlin 1.4

● Fixes 300 existing issues● Enables new language features● Supports more complicated

scenarios

Page 29: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Svetlana IsakovaDeveloper Advocate in Kotlin

New Language Features

Page 30: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Unified backends

*.js*.so*.js

frontendfrontend

old infrastructure new infrastructure

*.class*.class

common backend parts

Page 31: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin 1.4 backends

Kotlin/Native is already there

Kotlin/JVM backend is in Alphaused by JetPack Compose

Kotlin/JS backend is in AlphaResulting JS size: up to 2 times smaller

Page 32: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Server-sideProgramming Roman Elizarov

@relizarov

Page 33: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin 1.0Pragmatic Language for JVM and Android

Page 34: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

@Entityclass User( var login: String, var firstname: String, var lastname: String, @Id @GeneratedValue var id: Long? = null)

Page 35: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

JEP 359 Records (preview)

Java 14 Java 15

JEP 384 Records (2nd preview)JEP 360 Sealed classes (preview)

Page 36: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Java SAM conversion

public interface Action { void perform();}

acceptAction { // do something}

Page 37: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin 1.4 functional interfaces

fun interface Action { fun perform()}

acceptAction { // do something}

Page 38: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Productiveserver-side developmentwith Kotlin

Page 39: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Server-side Kotlin coroutines

@GetMapping("/{id}")suspend fun findOne(@PathVariable id: String): User? = userRepository.findOne(id) ?: throw CustomException("User not found")

Page 40: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

kotl.in/server-side

Page 41: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

fun main() { val server = embeddedServer(Netty, port = 8080) { routing { get("/") { call.respondText("Hello Ktor!") } } } server.start(wait = true)}

Ktor

Page 42: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Experimental

class Server: Kotless() { override fun prepare(app: Application) { app.routing { get("/") { call.respondText("Hello Kotless!") } } }}

Kotless

Page 43: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Runtimes CloudsFrameworks

Page 44: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin server-side adoption

Page 45: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Hadi HaririDeveloper Advocate in Kotlin,Team Lead in Ktor

Sébastien DeleuzeSpring Framework committerand Kotlin at VMware

Anton ArhipovDeveloper Advocate in Kotlin

Server-Side Development with Kotlin

The State of Kotlin Support in Spring

Ktor: Past, Present, and Future!

Vladislav TankovTeam Lead in Kotless

Serverless Development with Kotlin

Page 46: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

The MPPVision Svetlana Isakova

@sveta_isakova

Page 47: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin Multiplatform

Kotlin /JS

Kotlin /JVM

Kotlin / Native

CommonLanguageand Libs

Page 48: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Obj-C / Swift ecosystem, Native libraries

Kotlin Multiplatform

Kotlin /JS

Kotlin /JVM

Kotlin / Native

JVMecosystem

JSecosystem

CommonLanguageand Libs

Page 49: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Multiplatform core libraries

SerializationCoroutinesStdlib DateTime Ktor

Svetlana IsakovaNews From the Kotlin Standard Library

Hadi HaririKtor: Past, Present,and Future!

Ilya GorbunovIntroducing DateTime

Seva TolstopyatovCoroutines Update

Leonid Startsevkotlinx.serialization 1.0

Page 50: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

13%

77%

Android, JS,Native, Unknown

JVM

Kotlin usage in IntelliJ IDEA

Here we don’t count Android Studio

10%MPP

Page 51: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin/JS

Page 52: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Ktor Exposed Kotlin-React

The integrated team environmentby JetBrains

SpaceBeta

Kotlin DSL for styled-components

Page 53: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Raw JS

4M

DCE Zip

1M

3M

2M

1.1M

Bundle

3.9M

430K713K

New JS BackendNew Kotlin/JS Compiler Backend Old JS Backend

184K329K 40K74K

Improved interoperability with TypeScript / JavaScriptDecreased size of generated binaries

Page 55: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

WebAssembly + KotlinPrototype in progress

Page 56: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Sebastian AignerDeveloper Advocate in Kotlin

Kotlin/JS in 1.4 and beyond

Page 57: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

KotlinMultiplatformMobile Anastasia Kapanina

@a_kapanina

Page 58: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Native code

Shared code

Page 59: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin Multiplatform Mobile:an SDK for cross-platform mobile development

Page 60: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana
Page 61: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana
Page 62: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

App

Page 63: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

App

.jar

MyModule

Page 64: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

AppApp

.framework.jar

MyModule

Page 65: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana
Page 66: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

KMM Alpha → Beta

Page 67: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

KMM Alpha → Beta

Faster Kotlin/Native compilation

Onboarding experience

Bettercinterop UX

Better error messaging

Gradleimprovements

New Kotlin/Native memory model

Faster completionand highlighting

iOS interop improvements

Common testson local JVM

Page 68: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Dmitry SavvinovTeam Lead in Kotlin Multiplatform Mobile

Ekaterina PetrovaDeveloper Advocate in Kotlin

Florina Muntenescu Android Developer Advocate in Google

Kotlin 1.4 in Android

It's time to Kotlin Multiplatform Mobile

Diving into Kotlin Multiplatform

Page 69: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

@abreslav

Wrap-up Andrey Breslav

Page 70: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Kotlin developers

Back-end / Server

Front-end / Mobile / Web

Cloud

Data Science

And more

Page 71: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Summary

Performance and quality

New compiler

Server-side

KMM

Page 72: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

→ kotl.in/roadmap

Page 73: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Roman ElizarovTeam Lead in KotlinLanguage Research

A Look Into the Future

Page 74: Opening - JetBrains · 2020. 10. 12. · Frontend Backend Frontend Backend 4.5 times faster Not in 1.5. Reworked type inference ... Development with Kotlin. The MPP Vision Svetlana

Welcometo the Kotlin 1.4Online Event!

@kotlin@jetbrains