Principles of Programming in Scala

Introduction to Functional Programming
  • Strategy Pattern
  • Generic Strategy
  • Functions as values, and Higher order functions
  • Lambdas syntax
  • Difference between Methods and Functions
  • Recursive functions
  • Currying and partial function application and positional notation
  • Tail recursion
  • Val, var, lazy val, pass-by-value and pass-by-name
Object Oriented Programming in Scala
  • Classes, Objects, and Traits
  • Case classes as Functional Objects
  • Immutable objects
  • Accessors
  • Class extension, overriding vals, dynamic dispatch
  • Name based dependency resolution
  • Object hierarchy
  • Exceptions, Nothing and Null types, unit
  • Infix notation
  • Operators as methods
  • Tuples
Pattern matching
  • Option / Some / None
  • Extractors
  • Expression problem
  • Pattern forms
    • constants
    • variables
    • constructors
    • exceptions
  • PartialFunction
Collections and combinators
  • No syntax
  • Immutable vs mutable collections
  • Seq, Set, Map, Iterators
  • Take, drop etc,
  • Map, filter, folding, reduce
  • FlatMap, Collect,
  • Foreach
  • Working with list: :: operator :::
  • Function composition
  • GroupBy,
  • For comprehensions
  • Options with for
Implicits
  • Implicit classes: extension methods
    • Using tappers for debugging
  • Implicit defs: not-recommended (dotted relationships, array and string interoperability)
  • Implicit parameters: type classes
    • Reverse Ordering
Misc Topics
  • Streams
  • Regular expression
  • Memory implications of immutable data structures
  • Module system using traits
  • Packages and visibility
  • Java-Scala interoperability: collections
  • Auxiliary constructors
Discussion pain-points
  • Compile times
  • Binary compatibility
  • Sbt
  • Mixed coding styles
  • IDEs