[Haskell-cafe] Object Oriented programming for Functional Programmers
ky3 at atamo.com
Fri Jan 4 13:51:13 CET 2013
On Fri, Jan 4, 2013 at 7:27 PM, David Thomas <davidleothomas at gmail.com>wrote:
> Well, "hidden" - it *is* right there in the type signature still, it just
> doesn't *look* like an argument.
If you squint hard enough, (=>) looks like (->). Or maybe the other way
round. Whatever. :)
> It also might be optimized away in static cases (certainly, it *could*
> happen, whether does or is even worthwhile is another question).
The optimization at stake is specialization. Given (Num a => a), specialize
it to Int or Double or X so that it's memoizably first-class, which is
where functions still fall down . All functions are values but data
values still play nicer than others.
Isn't fixing this the real cure for the monomorphism restriction?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe