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
sira's awesome portfolio website redesign presentation
elsirapls
0
360
Fireside Chat
paigeccino
42
4k
Believing is Seeing
oripsolob
1
200
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
450
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
520
RailsConf 2023
tenderlove
30
1.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
980
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
220
Odyssey Design
rkendrick25
PRO
2
790
エンジニアに許された特別な時間の終わり
watany
108
250k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
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