SlideShare uma empresa Scribd logo
1 de 36
A sightseeing tour


      Iulian Dogariu
      Ness Technologies
Iași JUG – 13 February 2013
I’m sure I’ve been here before
That’s it! Goodbye



 And thank you for riding with Scala Tours
Who are You?
“If someone had shown me the
Programming in Scala book in 2003, I
would not have created Groovy”

                -- James Strachan, creator of Groovy
C:

“ASM is not portable”
C++:

     “C is nice,
but OOP is the future”
Java:

      “C++ is nice,
but it’s too dangerous”
C#:

    “Java is nice”
“And we’re so jealous!”
Scala?
     “Java is nice”
“And we’re so jealous”
    “… of Haskell”
   “… and Erlang”
   “… and Python”
Functional style
           Express processes, not just things




def listCapitalisedWords(text:String) =
    text.split("s").
      filterNot(_.isEmpty).
      filter(_.charAt(0).isUpper)
Massive concurrency

Message passing


No shared state


Ready for the “multicore era”
But also

Less code => Less room for bugs to hide in (!)


More expressive constraints in the types


Full Java interoperability
Options, options everywhere
“We can do this in Java too”



 It’s not what is possible, it’s what is easy
Pattern matching
Got Change?



val vs var
Traits
λ
What’s the use?



Language is a medium of expression, not just a tool
Data structures
     Choose the right one, and the algorithms take care of themselves

val weekdays = List(“Monday”, “Tuesday”,
                    “Wednesday”, “Thursday”,
                    “Friday”)

val beatles = Set(“Ringo”, “John”,
                  “Paul”, “George”)

val aTuple = (1, “John Smith”, false)

val dataset = Array( (1, “Ion Popescu”),
                     (3, “Maria Teodorescu”) )
Actors
Who uses Scala?




Source: slideshare.net/mslinn/scala-adoption-by-enterprises
How popular?




    …

         Source: TIOBE index February 2013
… hmm.




         Source: TIOBE index February 2013
Tooling
Pitfalls




and oddities
One more thing
specs2
[…] You can write large programs in
JavaScript. You just can’t maintain
them.
                           -- Anders Hejlsberg
Use your head

“Lacking opinions, all code reflects the coder”
Resources
• http://www.scala-lang.org

• Book: Martin Odersky – Programming in Scala

• Book: Venkat Subramaniam – Programming Scala

• Commercial support: Typesafe, Inc.
  http://www.typesafe.com
Thank you!

Mais conteúdo relacionado

Semelhante a Scala

Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSujit Majety
 
Functional (web) development with Clojure
Functional (web) development with ClojureFunctional (web) development with Clojure
Functional (web) development with ClojureHenrik Eneroth
 
Dr scalalove: How I learned to stop worrying and love the functions
Dr scalalove: How I learned to stop worrying and love the functionsDr scalalove: How I learned to stop worrying and love the functions
Dr scalalove: How I learned to stop worrying and love the functionsDianne Marsh
 
Scala final ppt vinay
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinayViplav Jain
 
ccna course 2
ccna course 2ccna course 2
ccna course 2S Sridhar
 
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)Eugene Yokota
 
Scala for the doubters
Scala for the doubtersScala for the doubters
Scala for the doubtersMax Klyga
 
Rubyslava - scala pattern matching
Rubyslava - scala pattern matchingRubyslava - scala pattern matching
Rubyslava - scala pattern matchingAndrea Šteňová
 
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 IGNManish Pandit
 
A seminar report on core java
A  seminar report on core javaA  seminar report on core java
A seminar report on core javaAisha Siddiqui
 
Introduction to scala for a c programmer
Introduction to scala for a c programmerIntroduction to scala for a c programmer
Introduction to scala for a c programmerGirish Kumar A L
 
Java notes | All Basics |
Java notes | All Basics |Java notes | All Basics |
Java notes | All Basics |ShubhamAthawane
 
JVM languages "flame wars"
JVM languages "flame wars"JVM languages "flame wars"
JVM languages "flame wars"Gal Marder
 
Data Science with Spark - Training at SparkSummit (East)
Data Science with Spark - Training at SparkSummit (East)Data Science with Spark - Training at SparkSummit (East)
Data Science with Spark - Training at SparkSummit (East)Krishna Sankar
 

Semelhante a Scala (20)

Devoxx
DevoxxDevoxx
Devoxx
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Functional (web) development with Clojure
Functional (web) development with ClojureFunctional (web) development with Clojure
Functional (web) development with Clojure
 
Dr scalalove: How I learned to stop worrying and love the functions
Dr scalalove: How I learned to stop worrying and love the functionsDr scalalove: How I learned to stop worrying and love the functions
Dr scalalove: How I learned to stop worrying and love the functions
 
Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
 
Scala final ppt vinay
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinay
 
ccna course 2
ccna course 2ccna course 2
ccna course 2
 
Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
 
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
 
Scala for the doubters
Scala for the doubtersScala for the doubters
Scala for the doubters
 
Rubyslava - scala pattern matching
Rubyslava - scala pattern matchingRubyslava - scala pattern matching
Rubyslava - scala pattern matching
 
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
 
A seminar report on core java
A  seminar report on core javaA  seminar report on core java
A seminar report on core java
 
Introduction to scala for a c programmer
Introduction to scala for a c programmerIntroduction to scala for a c programmer
Introduction to scala for a c programmer
 
Java or c++
Java or c++Java or c++
Java or c++
 
Big Data Analytics V2
Big Data Analytics V2Big Data Analytics V2
Big Data Analytics V2
 
Java notes | All Basics |
Java notes | All Basics |Java notes | All Basics |
Java notes | All Basics |
 
DSLs in JavaScript
DSLs in JavaScriptDSLs in JavaScript
DSLs in JavaScript
 
JVM languages "flame wars"
JVM languages "flame wars"JVM languages "flame wars"
JVM languages "flame wars"
 
Data Science with Spark - Training at SparkSummit (East)
Data Science with Spark - Training at SparkSummit (East)Data Science with Spark - Training at SparkSummit (East)
Data Science with Spark - Training at SparkSummit (East)
 

Scala