SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
Scala and Ruby
- Similarities and Differencies-


           Ubiregi Inc.
           Japan Scala Users Group
            Kota Mizushima
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.
Purpose of This Presentation

●
    Catch Scala beginners
       –   To use in production

●   Decrease complaint about Scala language
       –   from other language developer

●   Learn from Ruby community
Ruby and Scala ?
●   Dynamically Typed
●   Object Oriented
●   Many Syntax Sugar
●   Statically Typed
●   Object Oriented + Functional
●   Many Syntax Sugar
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
[1, 2, 3, 4, 5].each do{|x|
  puts x
}

[1, 2, 3, 4, 5].inject(0){|x, y| x + y}
List(1, 2, 3, 4, 5).foreach{x =>
  println(x)
}

List(1, 2, 3, 4, 5).foldLeft(0)(_ + _)
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
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
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
Conclusion




Learn something from Ruby community

Contenu connexe

Tendances

Writing DSL's in Scala
Writing DSL's in ScalaWriting DSL's in Scala
Writing DSL's in Scala
Abhijit Sharma
 

Tendances (13)

I18nize Scala programs à la gettext
I18nize Scala programs à la gettextI18nize Scala programs à la gettext
I18nize Scala programs à la gettext
 
Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1
 
[PGCONF.EU 2017 Keynote] Database Horror Stories, Bad Code, and How Not to be...
[PGCONF.EU 2017 Keynote] Database Horror Stories, Bad Code, and How Not to be...[PGCONF.EU 2017 Keynote] Database Horror Stories, Bad Code, and How Not to be...
[PGCONF.EU 2017 Keynote] Database Horror Stories, Bad Code, and How Not to be...
 
Beginning Java for .NET developers
Beginning Java for .NET developersBeginning Java for .NET developers
Beginning Java for .NET developers
 
Introduction to java programming
Introduction to java programmingIntroduction to java programming
Introduction to java programming
 
Core Java Training in Bangalore | Best Core Java Class in Bangalore
Core Java Training in Bangalore | Best Core Java Class in BangaloreCore Java Training in Bangalore | Best Core Java Class in Bangalore
Core Java Training in Bangalore | Best Core Java Class in Bangalore
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?
 
Scala
ScalaScala
Scala
 
Java Programming Important Topics
Java Programming Important Topics Java Programming Important Topics
Java Programming Important Topics
 
Scala for C# Developers
Scala for C# DevelopersScala for C# Developers
Scala for C# Developers
 
ORMs Meet SQL
ORMs Meet SQLORMs Meet SQL
ORMs Meet SQL
 
Using Scala for building DSLs
Using Scala for building DSLsUsing Scala for building DSLs
Using Scala for building DSLs
 
Writing DSL's in Scala
Writing DSL's in ScalaWriting DSL's in Scala
Writing DSL's in Scala
 

En vedette (11)

Man made marvels
Man made marvelsMan made marvels
Man made marvels
 
Project kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scalaProject kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scala
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
 
Arvindsujeeth scaladays12
Arvindsujeeth scaladays12Arvindsujeeth scaladays12
Arvindsujeeth scaladays12
 
Nps
NpsNps
Nps
 
Prediction suretogowrong
Prediction suretogowrongPrediction suretogowrong
Prediction suretogowrong
 
Cnc scala-presentation
Cnc scala-presentationCnc scala-presentation
Cnc scala-presentation
 
Proposal parade seni
Proposal parade seniProposal parade seni
Proposal parade seni
 
Frase dan klausa
Frase dan klausaFrase dan klausa
Frase dan klausa
 
Zaharia spark-scala-days-2012
Zaharia spark-scala-days-2012Zaharia spark-scala-days-2012
Zaharia spark-scala-days-2012
 
EDS selection & implementation @ CCC
EDS selection & implementation @ CCCEDS selection & implementation @ CCC
EDS selection & implementation @ CCC
 

Similaire à Scala days mizushima

A Shallow Survey of Alternative Languages on the JVM
A Shallow Survey of Alternative Languages on the JVMA Shallow Survey of Alternative Languages on the JVM
A Shallow Survey of Alternative Languages on the JVM
Charles Anderson
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorial
tutorialsruby
 

Similaire à Scala days mizushima (20)

Polyglot and functional (Devoxx Nov/2011)
Polyglot and functional (Devoxx Nov/2011)Polyglot and functional (Devoxx Nov/2011)
Polyglot and functional (Devoxx Nov/2011)
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)
 
Stairway to scala flyer
Stairway to scala flyerStairway to scala flyer
Stairway to scala flyer
 
Ruby an overall approach
Ruby an overall approachRuby an overall approach
Ruby an overall approach
 
Teaching Functional Programming @ TCD - 11/2012
Teaching Functional Programming @ TCD - 11/2012Teaching Functional Programming @ TCD - 11/2012
Teaching Functional Programming @ TCD - 11/2012
 
Why ruby
Why rubyWhy ruby
Why ruby
 
Writing Well-Behaved Unix Utilities
Writing Well-Behaved Unix UtilitiesWriting Well-Behaved Unix Utilities
Writing Well-Behaved Unix Utilities
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
 
Software Frameworks for Music Information Retrieval
Software Frameworks for Music Information RetrievalSoftware Frameworks for Music Information Retrieval
Software Frameworks for Music Information Retrieval
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
 
Java Closures
Java ClosuresJava Closures
Java Closures
 
Ruby and Security
Ruby and SecurityRuby and Security
Ruby and Security
 
Polyglot Grails
Polyglot GrailsPolyglot Grails
Polyglot Grails
 
PL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesPL Lecture 01 - preliminaries
PL Lecture 01 - preliminaries
 
Digging into Ruby Guts
Digging into Ruby GutsDigging into Ruby Guts
Digging into Ruby Guts
 
Rust baksia2014
Rust baksia2014Rust baksia2014
Rust baksia2014
 
Scala Online Training.pdf
Scala Online Training.pdfScala Online Training.pdf
Scala Online Training.pdf
 
Scala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud PlatformScala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud Platform
 
A Shallow Survey of Alternative Languages on the JVM
A Shallow Survey of Alternative Languages on the JVMA Shallow Survey of Alternative Languages on the JVM
A Shallow Survey of Alternative Languages on the JVM
 
Devoxx%202008%20Tutorial
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorial
 

Plus de Skills Matter Talks (9)

Couch db skillsmatter-prognosql
Couch db skillsmatter-prognosqlCouch db skillsmatter-prognosql
Couch db skillsmatter-prognosql
 
Jordan west real workscalazfinal2
Jordan west   real workscalazfinal2Jordan west   real workscalazfinal2
Jordan west real workscalazfinal2
 
(Oleg zhurakousky)spring integration-scala-intro
(Oleg zhurakousky)spring integration-scala-intro(Oleg zhurakousky)spring integration-scala-intro
(Oleg zhurakousky)spring integration-scala-intro
 
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in AngerSCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
 
Real World Scalaz
Real World ScalazReal World Scalaz
Real World Scalaz
 
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
 
Tmt predictions 2011
Tmt predictions 2011Tmt predictions 2011
Tmt predictions 2011
 
Martin sustrik future_of_messaging
Martin sustrik future_of_messagingMartin sustrik future_of_messaging
Martin sustrik future_of_messaging
 
Marek pubsubhuddle realtime_web
Marek pubsubhuddle realtime_webMarek pubsubhuddle realtime_web
Marek pubsubhuddle realtime_web
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Scala days mizushima

  • 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
  • 7. Dynamically Typed ● Object Oriented ● Many Syntax Sugar
  • 8. Statically Typed ● Object Oriented + Functional ● Many Syntax Sugar
  • 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}
  • 11. List(1, 2, 3, 4, 5).foreach{x => println(x) } List(1, 2, 3, 4, 5).foldLeft(0)(_ + _)
  • 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