[Haskell-cafe] Roles == type classes ???

Ketil Malde ketil at ii.uib.no
Wed May 9 07:46:21 EDT 2007


On Wed, 2007-05-09 at 10:41 +0100, Magnus Therning wrote:
> The way roles/traits are described in [1] (and the pages it links to)
> make me think of Haskell type classes.  Am I completely off in doing
> that?

At http://mail.python.org/pipermail/python-3000/2007-April/007026.html
we find this passage, which sounds faintly familiar:

| Now, how do roles/traits differ from interfaces? The primary
| distinction is that interfaces only define behavior¹, whereas roles can
| provide a dummy implementation.

Dude, where's my language?

-k

¹ For some value of 'behavior', apparently.



More information about the Haskell-Cafe mailing list