enum MarkerColor:
case Red
case Green
case Blue
has fewer surprises than
type MarkerColor = Int
The State Space of your codebase relates to Entropy and is the biodiversity index of bugs living in it.
But there is a surprising impact on a couple of small things you can do...
https://medium.com/swlh/type-system-saving-55db2ca062ff
• Nothing has 0 terms
• Unit has 1 term
• Boolean has 2
• Byte has 256
enum Three:
case One
case Two(b: Boolean)
case class Four(two: Boolean, too: Boolean)
type Pow[Base, Exponent] = Map[Exponent, Base]
type Eight = Pow[Two, Three]
https://alexknvl.com/posts/counting-type-inhabitants.html