1. Scala and Ruby
- Similarities and Differencies-
Ubiregi Inc.
Japan Scala Users Group
Kota Mizushima
2. Self-Introduction
● Kota Mizushima
– Ubiregi Inc.
– Leader of Japan Scala Users Group
– Use Ruby (RoR) and Obj-C mainly
– Plan to use Scala (Finagle) internally
● Programming Language Geek
– I love Nemerle, Scala, and so on.
3.
4.
5. Purpose of This Presentation
●
Catch Scala beginners
– To use in production
● Decrease complaint about Scala language
– from other language developer
● Learn from Ruby community
9. Similarities
●
Syntax
– Function as last method parameter
– Pseudo control structure using method call
● Semantics
– Method is not first-class value
– Behavior of return in anonymous function
10. [1, 2, 3, 4, 5].each do{|x|
puts x
}
[1, 2, 3, 4, 5].inject(0){|x, y| x + y}
12. Differencies
●
Approach to Standard library
– Ruby: Big Class Principle
●
Standard libraries for daily scripting
– Scala: ?
●
Standard libraries are poor for scripting
● Community Culture
– Ruby: There exists the Ruby way
– Scala: Absence of Scala way
13. Something Learnable from Ruby
– Community Culture -
●
The Scala Way is needed
– FAQ: Is my code Scala-ish code ?
● Don't be snappy
– Ignore unfair compliant from non-Scala user
– Scala beginner sometimes fear Scala community
● Use academic word carefully
14. Something learnable from Ruby
- Standard Library -
●
Daily scripting library important
– I/O library
– Network library
– Their library should be standard
● Too general library is bad signal
– To be pragmatic
– It's fine if 95% task can be done using it