today's puzzle really makes me want proper sum typ...
# advent-of-code
n
today's puzzle really makes me want proper sum types, sealed classes aren't cutting it. You can't put an enum class inside a sealed class because it can't inherit 😞
i
I suppose sealed interfaces would solve this problem
e
does it have to be an enum class? `object`works inside a sealed class
n
@ephemient good point, I used object and that makes it a bit nicer
Still not that comfortable with object
this case is obviously the tip of the iceberg really of issues with sealed classes (vs sum types) but at least there's a decent solution here