> Enums are the closest thing to sum types in an OO language.
jbgi
1

Yes, that’s true. Perhaps this line sums it up best:

> don’t provide first-class support for sum types

You can use sub-classing, and you can do things like the visitor pattern, but it’s a lot of boilerplate code, and it’s awkward to use them without pattern matching.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.