$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Whats the big deal with Scala
Search
todkar
July 11, 2012
Technology
1
210
Whats the big deal with Scala
Scala is as expressive as Ruby and as performant as Java and let me show you how.
todkar
July 11, 2012
Tweet
Share
Other Decks in Technology
See All in Technology
SDN の Hype Cycle を一通り経験してみて思うこと / Going through the Hype Cycle of SDN
mshindo
3
300
偶有的複雑性と戦うためのアーキテクチャとチームトポロジー
knih
7
4.8k
『Firebase Dynamic Links終了に備える』 FlutterアプリでのAdjust導入とDeeplink最適化
techiro
1
280
【平成レトロ】へぇボタンハック👨🔧
vanchan2625
0
160
2024年のAmazon Bedrockアップデート一挙おさらい 〜まだ間に合う! re:Invent直前までの重大ニュースを速習しよう〜
minorun365
PRO
3
130
もう一度、 事業を支えるシステムに。
leveragestech
5
1.6k
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
30
14k
Android 15 でウィジェットピッカーのプレビュー画像をGlanceで魅せたい/nikkei-tech-talk-27-1
nikkei_engineer_recruiting
0
110
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
4
2.8k
minify の効果を最大限に引き出す TypeScript コードを書く
jsakamoto
2
130
Mastering Quickfix
daisuzu
2
400
LLMを「速く」「安く」 動かすには / CloudNative Days Winter 2024
pfn
PRO
0
130
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
860
Facilitating Awesome Meetings
lara
50
6.1k
Adopting Sorbet at Scale
ufuk
73
9.1k
It's Worth the Effort
3n
183
27k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Producing Creativity
orderedlist
PRO
341
39k
Agile that works and the tools we love
rasmusluckow
327
21k
Happy Clients
brianwarren
98
6.7k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Music & Morning Musume
bryan
46
6.2k
How STYLIGHT went responsive
nonsquared
95
5.2k
Testing 201, or: Great Expectations
jmmastey
39
7.1k
Transcript
What’s the big deal with Scala?
[email protected]
Introduc=on to Scala • Runs on JVM • Fuses object-‐oriented
& func=onal paradigms though biased towards func=onal style • Sta=cally-‐typed
As expressive as Ruby, As performant as Java
Why am I comparing with Ruby and Java?
Disclaimer • Professionally a Ruby and Java developer
• Haven’t worked with Scala on a “real” project • Based on my experience working with the Credit Union Findr
Why Expressiveness? • Not just preUy • Reduces boilerplate code
• Less code to deal with & maintain • Elegant solu=on
Ruby class defini=on
Scala class defini=on
Closures • Closures are blocks of code that can
be passed around as parameters • Closures “close over” variables outside of its scope
Closures in Ruby
Closures in Scala
Ruby monkey patching
Scala implicit conversions
Performance and Scalability constructs
Tail recursion • Special type of func=on recursion • Final
ac=on taken in a func=on is the recursive call • Can avoid penalty of crea=ng a new stack frame for each recursive call
Lets look at some code... Tail recursion
Parallel collec=ons • Just like regular collec=ons • Can
be operated upon by mul=ple cores • Use Divide-‐and-‐conquer algorithm • Write-‐your-‐own
Lets look at some code... Parallel collec=ons
Actors • Actors are high-‐level concurrency construct as opposed
to threads and shared memory model • Actors communicate via message passing • PaUern matching is used for message processing
Lets look at some code... Actors
Cri=cism • Slow compiler – sbt incremental compila=on
– Daemon compiler • Too many features
Other items of interest • REPL • TypeSafe (Scala, Akka,
Play!) • Heroku
Func=onal yet beau=ful Rug from Qom, Iran h/p://upload.wikimedia.org/wikipedia/commons/c/ca/Farsh_Qom.JPG)
Thank you! @todkar