[Haskell-cafe] Re: OOPer?
leimy2k at gmail.com
Mon Nov 17 15:36:02 EST 2008
On Mon, Nov 17, 2008 at 10:39 AM, Maurício <briqueabraque at yahoo.com> wrote:
>> GHC says that the type of the result of 'function' is both determined by
>>> the "rigid type" from MyClass and the "rigid type" from MyData. But why
>>> can't both be the same?
>> are you OOPer? :)
> What is an OOPer?
I think, from the OOP point of view, that it is useful to think of classes
as collections of generic functions that may apply to different types, if
they happen to implement that class of functions. (Would it then be fair
to equate a Haskell class to a Java Interface, but not to a Java class?)
Type are more about a range of values allowed than about functionality, as
they are in OOP languages when defined by OOP classes.
The class/data type system in Haskell really does feel to me to be more like
CLOS than like C++/Java. But then I barely touched CLOS for a brief moment
in time to feel that way, so it's not a strong feeling :-)
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe