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 Ruby
Search
Hirokazu Nishioka
June 25, 2015
Programming
0
340
Scala vs Ruby
2015-06-25 第2回SpeeeTeckParty LT資料
Hirokazu Nishioka
June 25, 2015
Tweet
Share
More Decks by Hirokazu Nishioka
See All by Hirokazu Nishioka
全員でRuby/Rails移行を進めてきた話 / Shippai Night 2016
nisshiee
4
1.7k
イエウール立ち上げに込めた想い / Speee Cafe Meetup 04
nisshiee
2
660
2016-09-07 社内勉強会資料
nisshiee
0
1.6k
Rails × Elasticsearch
nisshiee
0
2k
【16/06 SpeeeKaigi】人工知能
nisshiee
0
1.1k
Speee Introduction
nisshiee
0
1.7k
Ruby初心者チームが「Ruby日本一」を目指して半年の話
nisshiee
4
4.6k
ぼくらがScalaを選ぶ理由〜入門編〜
nisshiee
4
1.9k
「良いコード」とは何か
nisshiee
0
360
Other Decks in Programming
See All in Programming
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
770
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
470
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
2
230
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
3
390
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
760
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Speed Design
sergeychernyshev
25
670
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Faster Mobile Websites
deanohume
305
30k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Building Your Own Lightsaber
phodgson
103
6.1k
Transcript
Scala vs Ruby 2015-06-25 ୈ2ճSpeeeTechParty LT Ԭ݉ @nisshieeorg
ࣗݾհ • Ԭ݉ʢʹ͓͔͠ ͻΖ͔ͣʣ • @nisshieeorg • ͖ͳݴޠɿScala • Scalaྺɿ4
• Ruby(Rails)ྺɿ1ϲ݄
ScalaͱRubyΛൺֱͯ͠ΈΔ RubyΛॻ͘͜ͱʹͳͬͨͷͰɾɾɾ
ͪΖΜؔܕͱOOPͷҧ͍ ͱ͔͋ΔΜ͚ͩͲɺ Ұ൪ҧͬͨͷɾɾɾ
҆৺ײͷ࡞Γํͷҧ͍ • ScalaʮίϯύΠϧ͕௨Ε͍͍ͩͨ߹ͬͯΔʯͱ ͍͏҆৺ײ ➡ ίϯύΠϧςετ ➡ ੩తܕ͚ؔܕݴޠͷύϫʔ • RubyςετͰ҆৺ײΛ࡞Δ
➡ ѹతʹςετ͕ॻ͖͍͢ ➡ ಈతܕ͚+ΦʔϓϯΫϥεͷύϫʔ
def fizzbuzz(i: Int): String = (i % 3, i %
5) match { case (0, 0) => "FizzBuzz" case (0, _) => "Fizz" case (_, 0) => "Buzz" case _ => i.toString } // ίϯύΠϧOK ! def fizzbuzz(i: Int): String = (i % 3, i % 5) match { case (0, _) => "Fizz" case (_, 0) => "Buzz" case (0, 0) => "FizzBuzz" case _ => i.toString } [error] /src/main/scala/App.scala:5: unreachable code [error] case (0, 0) => "FizzBuzz" ScalaͷίϯύΠϧ࣌νΣοΫೳྗʢҰྫʣ ※ "-Xfatal-warnings"ίϯύΠϥΦϓγϣϯ༻
ScalaͱRubyͬͯ݁ߏࣅͯΔ ʢҙ֎ʂʣ
OSSίϛϡχςΟ͕׆ൃ • ͳͷͰɺόʔδϣϯ͕ى͖Δ͆ • ґଘͷґଘͷόʔδϣϯࠩͰࢮ͵
ΞυϗοΫͳػೳՃ • ҰੲલΦʔϓϯΫϥε(Ruby)ͷಛݖͩͬͨ • ScalaͰ͖ΔΑʂ → ܕΫϥε (+ ϚΫϩ) •
ϥΠϒϥϦͷػೳ͕ίʔυʹγʔϜϨεʹ༥ ߹͢Δ • ϦϑΝϨϯε͕ݟ͍͆
Ͳָ͍ͬͪ͠(*°∀°)=3
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠