|
|
|
|
|
by cies
685 days ago
|
|
> that doesn't undo the last 15 years of Java code that I've written where that wasn't really an option. Same for C# with this new feature. Sum types (as I like to call tagged/type unions) are such an important tool to have, not having it makes languages resort to all kinds of abominations, e.g. exceptions, product types (= records, structs, etc) that are actually sum types, "null to signify something went wrong", etc. Not having them from a language's start results in an std lib that does not use them and hence teaches new comer to the language a bad way to do it. |
|