Remix.run Logo
shhsshs an hour ago

That is a LOT of code (very ugly code, I would add) that could be replaced by `type Float = float32 | float64` in a language with actual support for union types.

kccqzy 21 minutes ago | parent [-]

Tagged unions are not union types. A union type is a supertype for any arbitrary collection of types, but a tagged union is a single type with multiple data constructors, and does not require subtyping to be implemented.