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
Scala vs. Kotlin; Friend or Foe?
Search
oshai
July 02, 2018
Programming
0
170
Scala vs. Kotlin; Friend or Foe?
Talk in scalapeno 2018
oshai
July 02, 2018
Tweet
Share
More Decks by oshai
See All by oshai
Maintaining an Open Source The Good, Bad & Ugly
oshai
0
35
KScript
oshai
0
18
Klean Code with Kotlin
oshai
0
68
JVM languages shootout - Java, Scala & *Kotlin*
oshai
0
50
Koroutinify ; Lessons learned from applying Coroutines in Kotlin Backend ; Deep dive into Coroutines
oshai
1
120
Klean that Code, Boil those Boilerplates
oshai
2
81
No forks, One star. Now what?! — How I published my Kotlin Open-Source lib
oshai
0
76
Scala--pack your Future[T]; Kotlin is coming! (Kotlin TLV)
oshai
0
210
X tips [X==9] for building a Bulletproof Deployment Pipeline with Jenkins
oshai
0
50
Other Decks in Programming
See All in Programming
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
210
Feature Toggle は捨てやすく使おう
gennei
0
190
Java 21/25 Virtual Threads 소개
debop
0
190
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
500
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
530
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
170
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.2k
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
150
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
570
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
130
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
230
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
290
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.5k
Navigating Team Friction
lara
192
16k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Cult of Friendly URLs
andyhume
79
6.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
180
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
400
From π to Pie charts
rasagy
0
150
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Automating Front-end Workflow
addyosmani
1370
200k
Building AI with AI
inesmontani
PRO
1
810
Transcript
None
None
None
None
Conflicts
Threats • Identify • Compete • Conquer https://www.americanlearninglibrary.com/search/C/caesar/caesar.html
https://ja.wikipedia.org/wiki/%E3%82%B9%E3%83%86%E3%82%A3%E3%83%B3%E3%82%AC%E3%83%BC%E3%83%9F%E3%82%B5%E3%82%A4%E3%83%AB
What is Kotlin • Statically typed • Multi-Platform (JVM first,
JS and Native) • Open Source by JetBrains https://medium.com/@octskyward/why-kotlin-is-my-next-programming-language-c25c001e26e3
Kotlin Features • Concise
Kotlin Features • Concise • Safe
Kotlin Features • Concise • Safe • Interoperable
Kotlin Features • Concise • Safe • Interoperable • Tool-friendly
Kotlin Features • Concise • Safe • Interoperable • Tool-friendly
• Fun
Side by side comparison Scala val hello: String = “hi"
var hello: String = "hi" Kotlin val hello: String = “hi" var hello: String = "hi"
Side by side comparison Scala val hello = “hi" var
hello = "hi" Kotlin val hello = “hi" var hello = "hi"
Case / data class Scala case class Service( name: String
) Kotlin data class Service( val name: String )
Null safety Scala var hello: Option[String] = None hello.foreach {
s => println(s.toUpperCase()) } println(hello.map( _.toUpperCase()) .orNull()) Kotlin var hello: String? = null println(world.toUpperCase()) if (world != null) { println(world.toUpperCase()) } println(world?.toUpperCase())
Singleton Scala object Single { } Kotlin object Single {
}
Enum Scala Coming soon… Kotlin enum class Fruits { Apple,
Banana }
Implicit class / Extension method Scala 5.hours() Kotlin 5.hours()
Implicit class / Extension method Scala object Helpers { implicit
class IntMillis(x: Int) { def hours() = TimeUnit.HOURS.toMillis(x) } } … 5.hours() Kotlin fun Int.hours() = TimeUnit.HOURS.toMillis( this.toLong()) … 5.hours()
Operator overloading Scala It’s actually methods with fancy names Kotlin
Limited to arithmetic operators + - \ * etc’
Pattern matching Scala Cool and Useful! Kotlin Very limited
Implicit conversion Scala Yes we can! Kotlin no no no!
Where Scala shines • Popularity • Evangelism https://www.cvm.org.uk/blog/demolition-squad/eight-evangelism-strategies/
Where Scala shines https://redmonk.com/sogrady/2018/03/07/language-rankings-1-18/
Where Kotlin shines • Java++ - hit the sweet spot
• Great Java inter-op • Lean • Tooling • Pragmatic - not reinventing the wheel
• Compete http://www.zimbio.com/photos/Mesut+Oezil/Germany+v+Argentina/xxHxKC8AyXD
Suggestions for Scala designers • Let’s be practical:
Suggestions for Scala designers • Let’s be practical: • Binary
compatibility https://stackoverflow.com/questions/32255023/how-would-i-go-about-parsing-the-java-class-file-constant-pool
Suggestions for Scala designers • Let’s be practical: • Binary
compatibility • Faster compilation http://www.doodleosophies.com/doodle/30
Suggestions for Scala designers • Let’s be practical: • Binary
compatibility • Faster compilation • Improve Java inter-op
Suggestions for Scala users • Stick to features exists in
Kotlin
Suggestions for Scala users • Stick to features exists in
Kotlin • Make your code readable by all team members
Suggestions for Scala users Move to Kotlin…
Question?
Thank You! @OhadShai