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
LangChain Interrupt & LangChain Ambassadors meetingレポート
os1ma
2
310
成長し続けるアプリのためのテストと設計の関係、そして意思決定の記録。
sansantech
PRO
0
120
SmartNewsにおける 1000+ノード規模 K8s基盤 でのコスト最適化 – Spot・Gravitonの大規模導入への挑戦
vsanna2
0
130
United Airlines Customer Service– Call 1-833-341-3142 Now!
airhelp
0
170
生成AI開発案件におけるClineの業務活用事例とTips
shinya337
0
250
B2C&B2B&社内向けサービスを抱える開発組織におけるサービス価値を最大化するイニシアチブ管理
belongadmin
1
6.8k
AI時代の開発生産性を加速させるアーキテクチャ設計
plaidtech
PRO
3
150
OPENLOGI Company Profile for engineer
hr01
1
34k
Delegating the chores of authenticating users to Keycloak
ahus1
0
140
What’s new in Android development tools
yanzm
0
300
面倒な作業はAIにおまかせ。Flutter開発をスマートに効率化
ruideengineer
0
250
MUITにおける開発プロセスモダナイズの取り組みと開発生産性可視化の取り組みについて / Modernize the Development Process and Visualize Development Productivity at MUIT
muit
1
16k
Featured
See All Featured
Fireside Chat
paigeccino
37
3.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
We Have a Design System, Now What?
morganepeng
53
7.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Unsuck your backbone
ammeep
671
58k
Optimizing for Happiness
mojombo
379
70k
Music & Morning Musume
bryan
46
6.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Documentation Writing (for coders)
carmenintech
72
4.9k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
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