What makes the difference?Vlastimil Menčík, Jakub Janeček, Karel Smutný
Outline• introduction and design principles• a taste of Scala code• troubles and obstacles
What is Scala? statically typed languagethat unifies object orientedand functional programming
What is Scala?compiles into Java bytecode      runs inside JVMfully interoperable with Java
Scalable Language
Scalable Languagelanguage that grows with the demands of its                    users
Scalable Language• concise and expressive• few, yet very powerful building blocks• can be composed into complex structures
Everything is an object• no primitive types• functions are objects too• unified type system
No operators, only methods            1 + 2           1.+(2)new BigInt(4) * new BigInt(2)
Higher-order functionsList(1, 2, 3) map (n => n + 1)withConnection { c => c.prepareStatement(...) ...}
Higher-kinded types   Foo[T[_]]
Internal DSLs"A Stack" should "maintain LIFO order" in {    val stack = new Stack[Int]    stack.push(1)    stack.push(2)  ...
Scalable at RuntimeStatic typing
Scalable at Runtime      JVM
Solving difficult problems• parallelism• concurrency
Traditional approach• shared mutable state• synchronization, locking• difficult to reason about• race conditions, deadlocks
The Scala Way• immutability• functional programming• actor model• keeping sanity
Scalability in Practice
The Ecosystem• everything you want from Java• native Scala solutions (Akka, Play, …)• lively community
Academic roots• Martin Odersky, EPFL• strong theoretical foundation• Programming Methods Laboratory (LAMP)• results of res...
Future over Past• language innovations are more important  than backwards compatibility• Scala Improvement Process• improv...
The Scala Company• founded in 2011 (EPFL + Akka)• venture capital• Typesafe Stack• enterprise support, training, conferenc...
Upcoming SlideShare
Loading in …5
×

Scala - What Makes the Difference - Part 1

774 views
725 views

Published on

Part one of the "Scala - What Makes the Difference" presentation about Scala, its basic concepts, motivations and advantages by Vlastimil Menčík. The presentation was held at Faculty of Information Technology in Prague on April 8th.

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

No Downloads
Views
Total views
774
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Scala - What Makes the Difference - Part 1

  1. 1. What makes the difference?Vlastimil Menčík, Jakub Janeček, Karel Smutný
  2. 2. Outline• introduction and design principles• a taste of Scala code• troubles and obstacles
  3. 3. What is Scala? statically typed languagethat unifies object orientedand functional programming
  4. 4. What is Scala?compiles into Java bytecode runs inside JVMfully interoperable with Java
  5. 5. Scalable Language
  6. 6. Scalable Languagelanguage that grows with the demands of its users
  7. 7. Scalable Language• concise and expressive• few, yet very powerful building blocks• can be composed into complex structures
  8. 8. Everything is an object• no primitive types• functions are objects too• unified type system
  9. 9. No operators, only methods 1 + 2 1.+(2)new BigInt(4) * new BigInt(2)
  10. 10. Higher-order functionsList(1, 2, 3) map (n => n + 1)withConnection { c => c.prepareStatement(...) ...}
  11. 11. Higher-kinded types Foo[T[_]]
  12. 12. Internal DSLs"A Stack" should "maintain LIFO order" in { val stack = new Stack[Int] stack.push(1) stack.push(2) stack.pop() should equal (2) stack.pop() should equal (1) }
  13. 13. Scalable at RuntimeStatic typing
  14. 14. Scalable at Runtime JVM
  15. 15. Solving difficult problems• parallelism• concurrency
  16. 16. Traditional approach• shared mutable state• synchronization, locking• difficult to reason about• race conditions, deadlocks
  17. 17. The Scala Way• immutability• functional programming• actor model• keeping sanity
  18. 18. Scalability in Practice
  19. 19. The Ecosystem• everything you want from Java• native Scala solutions (Akka, Play, …)• lively community
  20. 20. Academic roots• Martin Odersky, EPFL• strong theoretical foundation• Programming Methods Laboratory (LAMP)• results of research projects bring innovations to the language
  21. 21. Future over Past• language innovations are more important than backwards compatibility• Scala Improvement Process• improvements must be general
  22. 22. The Scala Company• founded in 2011 (EPFL + Akka)• venture capital• Typesafe Stack• enterprise support, training, conferences, ...• investments in tooling

×