Hacker News new | past | comments | ask | show | jobs | submit login

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



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: