ADTs in Scala (Part 2: ADTs vs OO-Classes)
We look at the differences between classes and ADTs. We discuss:
- Public and private fields
- Pattern matching
This video is an introduction to ADTs in Scala for object-oriented developers. We look at the differences and show examples of how to change values in ADTs, how methods work and pattern matching.
To run the code yourself in Scastie go to https://scastie.scala-lang.org.