$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kotlin: An interoperability story
Search
Yan
November 20, 2018
Programming
0
92
Kotlin: An interoperability story
Yan
November 20, 2018
Tweet
Share
More Decks by Yan
See All by Yan
K2のKotlin IDEプラグインの中を覗いてみよう♪
yanex
1
4.8k
K2への道。コンパイラを作り直すってどういうこと?
yanex
2
1.1k
Other Decks in Programming
See All in Programming
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
350
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.9k
20 years of Symfony, what's next?
fabpot
2
370
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
520
Developing static sites with Ruby
okuramasafumi
0
310
Cap'n Webについて
yusukebe
0
140
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
430
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
100
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
2
220
開発に寄りそう自動テストの実現
goyoki
2
1.1k
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
120
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
390
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The Invisible Side of Design
smashingmag
302
51k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Speed Design
sergeychernyshev
33
1.4k
Optimizing for Happiness
mojombo
379
70k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.3k
Designing for Performance
lara
610
69k
[SF Ruby Conf 2025] Rails X
palkan
0
540
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Transcript
Kotlin: An interoperability story Yan Zhulanow, JetBrains Nov 2018
Good Java interoperability from the very beginning
Good Java interoperability from the very beginning Because we needed
it for our projects
Compiles to JVM bytecode equals? Good Java interoperability
Compiles to JVM bytecode equals? Good Java interoperability NO.
String? Nullable types
val name: String = null
val name: String = null Null can not be a
value of a non-null type String
val name: String? = null name.length
val name: String? = null name.length Only safe (?.) or
non-null asserted (!!.) calls are allowed
System.getProperty("my.property") String String? What about Java?
System.getProperty("my.property") String? What about Java?
class DetailsActivity : FragmentActivity() { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) setOrientation( getResources()!! .getConfiguration()!! .getOrientation()!!) getSupportFragmentManager()!! .beginTransaction()!! .add(android.R.id.content, DetailsFragment())!! .commit() } }
String! Platform types
Interoperable with Java
Interoperable with Java Ecosystem
Interoperable with Java Ecosystem Build tools Post-processors Analyzers Frameworks IDE
class Worker { @field:Inject var log: Logger? = null fun
process(task: Task) { log?.debug("$task started") task.run() log?.debug("$task ended") } }
class Worker { @field:Inject var log: Logger? = null fun
process(task: Task) { log?.debug("$task started") task.run() log?.debug("$task ended") } }
class Worker { @field:Inject lateinit var log: Logger fun process(task:
Task) { log.debug("$task started") task.run() log.debug("$task ended") } }
@field:Inject Annotations with use-site targets
allopen noarg sam-with-receiver Compiler plugins
Inspections Java AST
UAST (universal AST) Java AST Kotlin AST Inspections
Interoperable with Java
Interoperable with Java Android
Tiny runtime around 1 MB
Dalvik/ART support
Tooling support Build tools, Lint, Android Extensions
Annotation processor support Dagger, ButterKnife, the rest 9000 of them
Kotlin 1.3 Multi-platform projects!
Java Android Interoperable with
Java Android JavaScript Interoperable with
Java Android JavaScript C Interoperable with
Java Android JavaScript C Objective-C Interoperable with
Java Android JavaScript C Objective-C Swift Interoperable with
Java Android JavaScript C Objective-C Swift ??? Interoperable with
Java Android JavaScript C Objective-C Swift ??? Interoperable with ecosystem
We ❤ Kotlin. And we want to use it everywhere.
because
We ❤ Kotlin. And we want to use it everywhere.
because Back-end Front-end Android iOS Embedded Games Scripting ICPC Desktop Science
https://kotlinlang.org/
https://play.kotlinlang.org/
None
Thanks! ❤