3 ms·
Scala 3 has enums, which can also serve as ADts: https://docs.scala-lang.org/scala3/reference/enums/enums.html https://docs.scala-lang.org/scala3/reference/enum
by sc22 3y ago
Scala 3 has enums, which can also serve as ADts: https://docs.scala-lang.org/scala3/reference/enums/enums.html https://docs.scala-lang.org/scala3/reference/enums/enums.htm...
- da39a3ee 3y agoAh right, thanks. I've only used Scala 2. To what extent do Scala 3 enums give you what you want in the way of sum types? E.g. compared to Rust enums?