Haskell Typeclasses (was Re: OO in Python? ^^)

Aahz aahz at pythoncraft.com
Thu Dec 15 10:09:47 EST 2005


In article <1h7kymc.1n6gss7to9krnN%aleax at mail.comcast.net>,
Alex Martelli <aleax at mail.comcast.net> wrote:
>
>Right, you can get good genericity with Haskell's typeclasses (I've
>posted about that often in the past, and desperately and so far
>unsuccessfully tried to convince Guido to use something close to
>typeclasses rather than "interfaces" for such purposes as PEP 246
>[protocol adaptation]); it's the state of _templates_ in Haskell,
>specifically, which I was rather dubious about (it may be that I just
>haven't dug into them deep enough yet, but they do seem not a little
>"convoluted" to me, so far).

Hrm.  I don't recall anything about typeclasses, so my suspicion is that
you were writing something lengthy and above my head.  Can you write
something reasonably short about it?  (I'm asking partly for your
benefit, because if it makes sense to me, that will likely go a long way
toward making sense to Guido -- we seem to think similarly in certain
ways.)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Don't listen to schmucks on USENET when making legal decisions.  Hire
yourself a competent schmuck."  --USENET schmuck (aka Robert Kern)



More information about the Python-list mailing list