$30 off During Our Annual Pro Sale. View Details »
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
350
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.8k
イエウール立ち上げに込めた想い / Speee Cafe Meetup 04
nisshiee
2
710
2016-09-07 社内勉強会資料
nisshiee
0
1.7k
Rails × Elasticsearch
nisshiee
0
2.1k
【16/06 SpeeeKaigi】人工知能
nisshiee
0
1.2k
Speee Introduction
nisshiee
0
1.8k
Ruby初心者チームが「Ruby日本一」を目指して半年の話
nisshiee
4
4.8k
ぼくらがScalaを選ぶ理由〜入門編〜
nisshiee
4
1.9k
「良いコード」とは何か
nisshiee
0
370
Other Decks in Programming
See All in Programming
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
770
CSC305 Lecture 17
javiergs
PRO
0
200
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
700
モデル駆動設計をやってみよう Modeling Forum2025ワークショップ/Let’s Try Model-Driven Design
haru860
0
200
[SF Ruby Conf 2025] Rails X
palkan
0
380
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 1
philipschwarz
PRO
0
110
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
210
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
310
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
180
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
150
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
220
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
110
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
Building Adaptive Systems
keathley
44
2.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
Thoughts on Productivity
jonyablonski
73
4.9k
We Have a Design System, Now What?
morganepeng
54
7.9k
Building Applications with DynamoDB
mza
96
6.8k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
A Modern Web Designer's Workflow
chriscoyier
697
190k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Faster Mobile Websites
deanohume
310
31k
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
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠