short and fast introduction to scala
TRANSCRIPT
![Page 1: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/1.jpg)
A short and really fast Scala Introduction
Sergi González
![Page 2: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/2.jpg)
http://www.slideshare.net/sergigp/short-and-fast-introduction-to-scala
![Page 3: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/3.jpg)
Why Scala?
• Java Virtual Machine
• Concurrency
• Functional and Object Oriented
![Page 4: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/4.jpg)
Why Scala?• Immutable
• First Class Functions
• Type Interface
• Traits (oh yes!)
• Pattern Matching
• Actors (SPOILER ALERT)
• The IDE ❤
• ScalaTest
• Case classes, lazy, monads, implicits, Akka, Play, Spark…
![Page 5: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/5.jpg)
Why Scala
In order to code less and save money in keyboards As a catalan lazy developer I want a programming language that makes for me the boilerplate
Feature:
![Page 6: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/6.jpg)
Why Scala
![Page 7: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/7.jpg)
Variables and Values
![Page 8: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/8.jpg)
If, while, functions …
![Page 9: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/9.jpg)
Pattern Matching
![Page 10: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/10.jpg)
Pattern Matching
![Page 11: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/11.jpg)
Pattern Matching
![Page 12: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/12.jpg)
Pattern Matching
![Page 13: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/13.jpg)
Pattern Matching
Recursive functions + Pattern Matching = WIN
![Page 14: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/14.jpg)
Lists and more…
https://github.com/sergigp/scala-notes/blob/master/akamon/2_lists.sc
![Page 15: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/15.jpg)
OOP
![Page 16: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/16.jpg)
OOP
Traits, Objects, Generics,
Multiple Inheritance…
![Page 17: Short and fast introduction to Scala](https://reader031.vdocuments.net/reader031/viewer/2022021814/58e4e4521a28ab87378b4a95/html5/thumbnails/17.jpg)
FizzBuzz• Given a number:
• If it’s multiple of 3 return “fizz”
• If it’s multiple of 5 return “buzz”
• If it’s multiple of 3 and 5 return “fizzbuzz”
• If it’s not multiple of 3 or 5 return the number