12
Looking good. Especially looking forward to unions backed by a struct.
Looking good. Especially looking forward to unions backed by a struct.
This exactly what I described in 2021, so I'm pretty happy seeing other languages also going this route.
Sadly, they also don't have a solution for the follow-up question that naturally falls out if this approach -- how to "unbox" generic types such that they can be used directly and don't need some additional type to hold it, i.e.
union Option[T] of T, None // None defined elsewhere
instead of
union Option[T] of Some[T], None // Some & None defined elsewhere
A community about the C# programming language
Getting started
Useful resources
IDEs and code editors
Tools
Rules
Related communities