Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kotlin-techtalk_v0.1
Search
frostman
February 10, 2012
73
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kotlin-techtalk_v0.1
frostman
February 10, 2012
More Decks by frostman
See All by frostman
kotlin_techtalk
frostman
1
110
test
frostman
0
52
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
480
The untapped power of vector embeddings
frankvandijk
2
1.8k
A Modern Web Designer's Workflow
chriscoyier
698
190k
How to make the Groovebox
asonas
2
2.4k
The agentic SEO stack - context over prompts
schlessera
0
880
A better future with KSS
kneath
240
18k
Navigating Team Friction
lara
192
16k
We Are The Robots
honzajavorek
0
320
The Cost Of JavaScript in 2023
addyosmani
55
10k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
950
Side Projects
sachag
455
43k
Transcript
THE KOTLIN PROGRAMMING LANGUAGE Sergey Lukjanov, 2012
[email protected]
1 Thursday,
February 9, 12
WHAT IS KOTLIN? 2 Thursday, February 9, 12
WHAT IS KOTLIN? 2 •JVM-targeted Thursday, February 9, 12
WHAT IS KOTLIN? 2 •JVM-targeted •Statically typed Thursday, February 9,
12
WHAT IS KOTLIN? 2 •JVM-targeted •Statically typed •Object-oriented Thursday, February
9, 12
WHAT IS KOTLIN? 2 •JVM-targeted •Statically typed •Object-oriented •General purpose
Thursday, February 9, 12
WHAT IS KOTLIN? 2 •JVM-targeted •Statically typed •Object-oriented •General purpose
•Programming language Thursday, February 9, 12
WHAT IS KOTLIN? 2 •JVM-targeted •Statically typed •Object-oriented •General purpose
•Programming language •Docs available today Thursday, February 9, 12
WHAT IS KOTLIN? 2 •JVM-targeted •Statically typed •Object-oriented •General purpose
•Programming language •Docs available today •Public beta in Q1 2012 Thursday, February 9, 12
OUTLINE 3 Thursday, February 9, 12
OUTLINE 3 •Motivation Thursday, February 9, 12
OUTLINE 3 •Motivation •Design goals Thursday, February 9, 12
OUTLINE 3 •Motivation •Design goals •Feature overview Thursday, February 9,
12
OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax Thursday,
February 9, 12
OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,
types, inheritance Thursday, February 9, 12
OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,
types, inheritance •Generics Thursday, February 9, 12
OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,
types, inheritance •Generics •High-order functions Thursday, February 9, 12
OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,
types, inheritance •Generics •High-order functions •Type-safe Groovy-style builders Thursday, February 9, 12
OUTLINE 3 •Motivation •Design goals •Feature overview •Basic syntax •Classes,
types, inheritance •Generics •High-order functions •Type-safe Groovy-style builders •Pattern matching Thursday, February 9, 12
MOTIVATION 4 Thursday, February 9, 12
MOTIVATION 4 •IDEA codebase ≥ 200MB of Java-code Thursday, February
9, 12
MOTIVATION 4 •IDEA codebase ≥ 200MB of Java-code •?? Thursday,
February 9, 12
MOTIVATION 4 •IDEA codebase ≥ 200MB of Java-code •?? •??
Thursday, February 9, 12
MOTIVATION 4 •IDEA codebase ≥ 200MB of Java-code •?? •??
•?? Thursday, February 9, 12
DESIGN GOALS 5 Thursday, February 9, 12
DESIGN GOALS 5 •Full Java interoperability Thursday, February 9, 12
DESIGN GOALS 5 •Full Java interoperability •Compiles as fast as
Java Thursday, February 9, 12
DESIGN GOALS 5 •Full Java interoperability •Compiles as fast as
Java •Safer than Java Thursday, February 9, 12
DESIGN GOALS 5 •Full Java interoperability •Compiles as fast as
Java •Safer than Java •More concise than Java Thursday, February 9, 12
DESIGN GOALS 5 •Full Java interoperability •Compiles as fast as
Java •Safer than Java •More concise than Java •Way simpler than Scala Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees Thursday, February 9,
12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with
default impl) Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with
default impl) •First-class delegation Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with
default impl) •First-class delegation •Properties (instead of fields) Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with
default impl) •First-class delegation •Properties (instead of fields) •Reified generics Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with
default impl) •First-class delegation •Properties (instead of fields) •Reified generics •Declaration-site variance & “Type projections” Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with
default impl) •First-class delegation •Properties (instead of fields) •Reified generics •Declaration-site variance & “Type projections” •High-order functions (“closures”) Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with
default impl) •First-class delegation •Properties (instead of fields) •Reified generics •Declaration-site variance & “Type projections” •High-order functions (“closures”) •Extension functions Thursday, February 9, 12
FEATURE OVERVIEW 1/2 6 •Static null-safety guarantees •Traits (interfaces with
default impl) •First-class delegation •Properties (instead of fields) •Reified generics •Declaration-site variance & “Type projections” •High-order functions (“closures”) •Extension functions •Inline-functions (zero-overhead closures) Thursday, February 9, 12
FEATURE OVERVIEW 2/2 7 Thursday, February 9, 12
FEATURE OVERVIEW 2/2 7 •Tuples Thursday, February 9, 12
FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure Thursday,
February 9, 12
FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern
matching Thursday, February 9, 12
FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern
matching •Range expressions Thursday, February 9, 12
FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern
matching •Range expressions •String templates Thursday, February 9, 12
FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern
matching •Range expressions •String templates •Singletons Thursday, February 9, 12
FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern
matching •Range expressions •String templates •Singletons •Operator overloading Thursday, February 9, 12
FEATURE OVERVIEW 2/2 7 •Tuples •Modules and build infrastructure •Pattern
matching •Range expressions •String templates •Singletons •Operator overloading •Full-featured IDE by JetBrains Thursday, February 9, 12
CODE EXAMPLES 8 Thursday, February 9, 12
HELLO, WORLD! package hw.simple fun main(args : Array<String>) : Unit
{ println("Hello, World!"); } fun println(str : String) /* : Unit */ { System.out?.println(str); } 9 Thursday, February 9, 12
HELLO, <NAMES>! 10 Thursday, February 9, 12
TYPES HIERARCHY 11 Any? Any Int? Int Complete lattice ...
supremum infimum Thursday, February 9, 12