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
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
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
1
170
AIが実装する時代、人間は仕様と検証を設計する
gotalab555
1
140
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
840
コミュニティが変えるキャリアの地平線:コロナ禍新卒入社のエンジニアがAWSコミュニティで見つけた成長の羅針盤
kentosuzuki
0
130
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
360
1,000 にも届く AWS Organizations 組織のポリシー運用をちゃんとしたい、という話
kazzpapa3
0
140
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
190
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
400
Exadata Fleet Update
oracle4engineer
PRO
0
1.1k
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.6k
pool.ntp.orgに ⾃宅サーバーで 参加してみたら...
tanyorg
0
530
Featured
See All Featured
From π to Pie charts
rasagy
0
130
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
150
Mobile First: as difficult as doing things right
swwweet
225
10k
Rails Girls Zürich Keynote
gr2m
96
14k
WCS-LA-2024
lcolladotor
0
450
WENDY [Excerpt]
tessaabrams
9
36k
A Tale of Four Properties
chriscoyier
162
24k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Ethics towards AI in product and experience design
skipperchong
2
200
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