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
レビューを増やしつつ 高評価維持するテクニック
tsuzuki817
1
480
Datadogとともにオブザーバビリティを布教しよう
mego2221
0
130
リアルタイム分析データベースで実現する SQLベースのオブザーバビリティ
mikimatsumoto
0
1.2k
Building Products in the LLM Era
ymatsuwitter
10
5k
「海外登壇」という 選択肢を与えるために 〜Gophers EX
logica0419
0
640
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.4k
OpenID BizDay#17 KYC WG活動報告(法人) / 20250219-BizDay17-KYC-legalidentity
oidfj
0
140
Postman Flowsの基本 / Postman Flows Basics
yokawasa
1
100
オブザーバビリティの観点でみるAWS / AWS from observability perspective
ymotongpoo
8
1.3k
あれは良かった、あれは苦労したB2B2C型SaaSの新規開発におけるCloud Spanner
hirohito1108
2
370
技術的負債解消の取り組みと専門チームのお話 #技術的負債_Findy
bengo4com
1
1.2k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
91
5.8k
We Have a Design System, Now What?
morganepeng
51
7.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Producing Creativity
orderedlist
PRO
343
39k
For a Future-Friendly Web
brad_frost
176
9.5k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
GraphQLとの向き合い方2022年版
quramy
44
13k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
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