[Haskell-cafe] Object oriented haskell.

silvio silvio.frischi at gmail.com
Thu May 15 21:37:40 UTC 2014


> In what languages is (.) cool, and in what way?

Because depending on what is before it, what is behind it can have
different meanings. For me this is one of the main points. I just don't
like the name collision problem in Haskell. Take something like size for
instance it is pretty clear what it means yet unless you have a type
class that everybody knows about you can use it on only one thing. And
even if you have a simple type class some object might want to return an
Int and some other might want to return an Integer. With (.) being from
a multiparameter typeclass you can define for each object what it means
without any of them knowing about the others. And you are not even
limited to, let's call them, 'labels' like size. You can also use any
other Type you want like the key of a database object or as in my
example a Map.

Silvio


More information about the Haskell-Cafe mailing list