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.6k
イエウール立ち上げに込めた想い / Speee Cafe Meetup 04
nisshiee
2
650
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
WEBエンジニア向けAI活用入門
sutetotanuki
0
330
受け取る人から提供する人になるということ
little_rubyist
0
180
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
450
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
4
1.9k
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
17
4.3k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
190
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
190
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
480
CSC509 Lecture 09
javiergs
PRO
0
140
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
460
Tuning GraphQL on Rails
pyama86
2
1.2k
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
190
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
A Philosophy of Restraint
colly
203
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
15
2k
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
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠