I am looking to define the following algebraic data type in scala:
sealed trait Beat
case object Rest extends Beat
case object Hit extends Beat
Is there any difference, if I were to define this instead as:
abstract sealed class Beat
case object Rest extends Beat
case object Hit extends Beat
i.e. using an abstract sealed class instead of a trait? The definitions appear to be equivalent.