This repository will help you to understand all the syntax sugar that we get
by just preprending case
to the definition of a class or object.
- Prepare your local environment by either installing Intellij with its Scala plugin or sbt and your favourite editor.
- Read
LabelledPoint
andModule
and their tests. - Remove the
case
keyword in both declarations. I recommend you to comment tests not compiling until you can focus on them. Alternatively checkout theexercise
branch. - Add code until tests pass again!
By handwriting the code that scalac
would otherwise generate automatically you
will be able to better understand what case classes do for you and how to use it.