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
100
test
frostman
0
52
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Utilizing Notion as your number one productivity tool
mfonobong
4
330
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
170
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Producing Creativity
orderedlist
PRO
348
40k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Un-Boring Meetings
codingconduct
0
320
Deep Space Network (abreviated)
tonyrice
0
210
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
200
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