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
360
0
Share
Scala vs Ruby
2015-06-25 第2回SpeeeTeckParty LT資料
Hirokazu Nishioka
June 25, 2015
More Decks by Hirokazu Nishioka
See All by Hirokazu Nishioka
全員でRuby/Rails移行を進めてきた話 / Shippai Night 2016
nisshiee
4
1.8k
イエウール立ち上げに込めた想い / Speee Cafe Meetup 04
nisshiee
2
740
2016-09-07 社内勉強会資料
nisshiee
0
1.7k
Rails × Elasticsearch
nisshiee
0
2.2k
【16/06 SpeeeKaigi】人工知能
nisshiee
0
1.2k
Speee Introduction
nisshiee
0
1.9k
Ruby初心者チームが「Ruby日本一」を目指して半年の話
nisshiee
4
4.9k
ぼくらがScalaを選ぶ理由〜入門編〜
nisshiee
4
1.9k
「良いコード」とは何か
nisshiee
0
380
Other Decks in Programming
See All in Programming
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
370
The Less-Told Story of Socket Timeouts
coe401_
3
1.1k
Road to RubyKaigi: Play Hard(ware)
makicamel
1
560
認証統合から始めるフロントエンドの機能単位開発 — マイクロサービス思想の適用
koukimiura
0
100
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
220
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
4.8k
AI-DLC Deep Dive
yuukiyo
9
5.6k
Explore CoroutineScope
tomoeng11
0
180
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1k
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
430
実用!Hono RPC2026
yodaka
2
300
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
180
Rails Girls Zürich Keynote
gr2m
96
14k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Claude Code のすすめ
schroneko
67
220k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Accessibility Awareness
sabderemane
1
110
The agentic SEO stack - context over prompts
schlessera
0
770
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
130
Designing Powerful Visuals for Engaging Learning
tmiket
1
360
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠