Y
Hacker News
new
|
ask
|
show
|
jobs
by
rbonvall
3321 days ago
Indeed, there is already a proposal for an enum syntax in dotty that looks almost exactly like that:
enum Tree[T] { case Branch(t: Tree[T]) case Leaf(t: T) }
https://github.com/lampepfl/dotty/issues/1970