Preventing boilerplate in a language with macros as a focus is not good enough 
to justify direct union/sum types over object variants. And if you want type 
safety, you will still experience a similar amount of friction with either 
design.

I also know only 1 language that implements them, 
[Crystal](https://crystal-lang.org/reference/1.10/syntax_and_semantics/union_types.html).
 So it's a lot of responsibility to get it right.

That being said, there are (fairly tentative) recent RFCs with a lot of 
relevant discussion, <https://github.com/nim-lang/RFCs/issues/527> and 
<https://github.com/nim-lang/RFCs/issues/525>.

Reply via email to