Scala

582 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

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

No notes for slide

Scala

  1. 1. A sightseeing tour Iulian Dogariu Ness TechnologiesIași JUG – 13 February 2013
  2. 2. I’m sure I’ve been here before
  3. 3. That’s it! Goodbye And thank you for riding with Scala Tours
  4. 4. Who are You?
  5. 5. “If someone had shown me theProgramming in Scala book in 2003, Iwould not have created Groovy” -- James Strachan, creator of Groovy
  6. 6. C:“ASM is not portable”
  7. 7. C++: “C is nice,but OOP is the future”
  8. 8. Java: “C++ is nice,but it’s too dangerous”
  9. 9. C#: “Java is nice”“And we’re so jealous!”
  10. 10. Scala? “Java is nice”“And we’re so jealous” “… of Haskell” “… and Erlang” “… and Python”
  11. 11. Functional style Express processes, not just thingsdef listCapitalisedWords(text:String) = text.split("s"). filterNot(_.isEmpty). filter(_.charAt(0).isUpper)
  12. 12. Massive concurrencyMessage passingNo shared stateReady for the “multicore era”
  13. 13. But alsoLess code => Less room for bugs to hide in (!)More expressive constraints in the typesFull Java interoperability
  14. 14. Options, options everywhere
  15. 15. “We can do this in Java too” It’s not what is possible, it’s what is easy
  16. 16. Pattern matching
  17. 17. Got Change?val vs var
  18. 18. Traits
  19. 19. λ
  20. 20. What’s the use?Language is a medium of expression, not just a tool
  21. 21. Data structures Choose the right one, and the algorithms take care of themselvesval 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”) )
  22. 22. Actors
  23. 23. Who uses Scala?Source: slideshare.net/mslinn/scala-adoption-by-enterprises
  24. 24. How popular? … Source: TIOBE index February 2013
  25. 25. … hmm. Source: TIOBE index February 2013
  26. 26. Tooling
  27. 27. Pitfallsand oddities
  28. 28. One more thing
  29. 29. specs2
  30. 30. […] You can write large programs inJavaScript. You just can’t maintainthem. -- Anders Hejlsberg
  31. 31. Use your head“Lacking opinions, all code reflects the coder”
  32. 32. 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
  33. 33. Thank you!

×