I think the biggest advantage of having case classes
over enumerations
is that you can use type class pattern a.k.a ad-hoc polymorphysm. Don't need to match enums like:
someEnum match {
ENUMA => makeThis()
ENUMB => makeThat()
}
instead you'll have something like:
def someCode[SomeCaseClass](implicit val maker: Maker[SomeCaseClass]){
maker.make()
}
implicit val makerA = new Maker[CaseClassA]{
def make() = ...
}
implicit val makerB = new Maker[CaseClassB]{
def make() = ...
}