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: An interoperability story
Search
Yan
November 20, 2018
Programming
0
100
Kotlin: An interoperability story
Yan
November 20, 2018
Tweet
Share
More Decks by Yan
See All by Yan
K2のKotlin IDEプラグインの中を覗いてみよう♪
yanex
1
4.9k
K2への道。コンパイラを作り直すってどういうこと?
yanex
2
1.2k
Other Decks in Programming
See All in Programming
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
230
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.5k
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
580
AI活用のコスパを最大化する方法
ochtum
0
180
The free-lunch guide to idea circularity
hollycummins
0
270
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1k
へんな働き方
yusukebe
3
2.2k
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
190
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
170
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
280
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
260
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
990
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
230
How to Think Like a Performance Engineer
csswizardry
28
2.5k
[SF Ruby Conf 2025] Rails X
palkan
2
830
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
770
Raft: Consensus for Rubyists
vanstee
141
7.4k
Designing Powerful Visuals for Engaging Learning
tmiket
0
280
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
480
Done Done
chrislema
186
16k
HDC tutorial
michielstock
1
550
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! ❤