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
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
Arm移行タイムアタック
qnighy
0
340
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
イベント駆動で成長して委員会
happymana
1
340
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.8k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
940
デザインパターンで理解するLLMエージェントの作り方 / How to develop an LLM agent using agentic design patterns
rkaga
3
190
受け取る人から提供する人になるということ
little_rubyist
0
250
React への依存を最小にするフロントエンド設計
takonda
10
2.3k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
133
8.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Navigating Team Friction
lara
183
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Unsuck your backbone
ammeep
668
57k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Ruby is Unlike a Banana
tanoku
97
11k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Happy Clients
brianwarren
98
6.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
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
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠