Re:Problems with TypeScript in 2020
by samhh on Saturday April 18, 2020 @08:05AM
(#22907135)
I think number one can be handled with type classes. Usually if you want to pass in radically different structures there's some common underlying structure.
[ Parent
| on HN ]
type classes sort of solve the same problem and in both rust and haskell they can sort of emulate union types (I have no idea about the details, I am not an expert of subtyping).
Still the usability feature of being able to quickly create arbitrary union types is undeniable (Julia uses something similar as a main source of polymorphism and personally I think it is amazing)