Re:Union types ('enum types') would be complicated in Go
by wbl on Monday December 09, 2024 @03:53PM
(#42370452)
It's not clear to me that that would satisfy the categorical properties of coproduct that are wanted.
[ Parent
| on HN ]
Re:Union types ('enum types') would be complicated in Go
by foldr on Tuesday December 10, 2024 @04:19AM
(#42375189)
Nobody cares about the categorical properties of the coproduct. But in any case, there's no theoretical issue here, since it would be just as if every enum had a 'Nil' variant implicitly defined.