3 ms·
I agree that implicits and type-classes can provide ad-hoc polymorphism, but I'm not aware that they have been reduced completely to FP without them, I'm also n
by mafribe 10y ago
I agree that implicits and type-classes can provide ad-hoc polymorphism,
but I'm not aware that they have been reduced completely to FP without
them, I'm also not aware of implicits and type-classes working in an
untyped setting. If you have references to the contrary, I'd be
interested to hear about it.
- platz 10y agoWell if one is looking for proofs, I think this is hard while remaining abstract from specific languages. I could counter that support for parametric polymorphism is poor in OO langs as much as you claim support for ad-hoc polymorphism is poor in FP langs. (but I don't place much stock in any of the aforementioned claims outside of some kind of artifical, academic context) Real-world problems that aren't an academic edge-cases will be supported by both FP and OO. Multimethods give you ad-hoc polymorphism in an uptyped setting.
- mafribe 10y agoParametric polymorphism is a concept that is orthogonal from the FP/OO distinction. You can define parametric polymorphism for parallel computation for example.