Scala days mizushima

814 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
814
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Scala days mizushima

  1. 1. Scala and Ruby- Similarities and Differencies- Ubiregi Inc. Japan Scala Users Group Kota Mizushima
  2. 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. 3. Purpose of This Presentation● Catch Scala beginners – To use in production● Decrease complaint about Scala language – from other language developer● Learn from Ruby community
  4. 4. Ruby and Scala ?
  5. 5. ● Dynamically Typed● Object Oriented● Many Syntax Sugar
  6. 6. ● Statically Typed● Object Oriented + Functional● Many Syntax Sugar
  7. 7. 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
  8. 8. [1, 2, 3, 4, 5].each do{|x| puts x}[1, 2, 3, 4, 5].inject(0){|x, y| x + y}
  9. 9. List(1, 2, 3, 4, 5).foreach{x => println(x)}List(1, 2, 3, 4, 5).foldLeft(0)(_ + _)
  10. 10. 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
  11. 11. Something Learnable from Ruby – Community Culture -● The Scala Way is needed – FAQ: Is my code Scala-ish code ?● Dont be snappy – Ignore unfair compliant from non-Scala user – Scala beginner sometimes fear Scala community● Use academic word carefully
  12. 12. 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 – Its fine if 95% task can be done using it
  13. 13. ConclusionLearn something from Ruby community

×