3 ms·
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.
by samhh 6y ago
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.
- afiori 6y agotype 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)