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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
The untapped power of vector embeddings
frankvandijk
2
1.8k
KATA
mclloyd
PRO
35
15k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Writing Fast Ruby
sferik
630
63k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Building Adaptive Systems
keathley
44
3.1k
Rails Girls Zürich Keynote
gr2m
96
14k
Documentation Writing (for coders)
carmenintech
77
5.4k
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