The essence of Scala

Introduction to Scala

David Venturi

Curriculum Manager, DataCamp

The final video!

$$ Scala logo

$$ Smiley face dancing

1 Dancing smiley by Krabat der Zauberlehrling
Introduction to Scala

The functional style

  • Operations of a program should map input values to output values rather than change data in place

Pipe with no leaks

Introduction to Scala

Non-functional code

  • WHEN operations of a program DON'T map input values to output values and DO change data in place

Leaky pipe

Introduction to Scala

The functional style

  • Operations of a program should map input values to output values rather than change data in place

Pipe with no leaks

Introduction to Scala

Benefits of the functional style

  • Your data won't be changed inadvertently
  • Your code is easier to reason about
  • You have to write fewer tests
  • Functions are more reliable and reusable
Introduction to Scala

Scala is a hybrid imperative/functional language

Prefer

  • val
  • Immutable objects
  • Functions without side effects

If necessary

  • var
  • Mutable objects
  • Functions with side effects
Introduction to Scala

What's next

Programming
  • Functions
  • More collections
  • More types
  • Object-oriented programming
  • Functional programming
  • Pattern matching
  • Concurrency
  • More...
Data
  • Scala for the data engineer
  • Scala for the data scientist
  • Scala for the machine learning engineer

Apache Spark logo

Introduction to Scala

The essence of Scala

Martin Odersky and the Scala logo

Introduction to Scala

The essence of Scala

Martin Odersky and the Scala logo

Fusing functional and object-oriented programming

1 http://bit.ly/scala_days_odersky_2018
Introduction to Scala

The essence of Scala

Martin Odersky and the Scala logo

Fusing functional and object-oriented programming in a statically-typed setting

1 http://bit.ly/scala_days_odersky_2018
Introduction to Scala

Congratulations!

Introduction to Scala

Preparing Video For Download...