4 ms·
> I stand corrected, as monomorphization is optional for parametric polymorphism but mandatory for ad hoc polymorphism. It's not mandatory for ad-hoc polymorph
by bjz_ 8y ago
> I stand corrected, as monomorphization is optional for parametric polymorphism but mandatory for ad hoc polymorphism.
It's not mandatory for ad-hoc polymorphism. Haskell desugars ah-hoc polymorphism to dictionary passing (although it often does inlining to reduce the overhead of this).
- lifthrasiir 8y agoI do not consider type classes as ad hoc polymorphism, I should have clarified this first.
- u320 8y agoMost people do, though.