I loosely do understandbut very looselybut I'm not, as yet,
convinced it is completely relevant.
The implementation may differ, but that does not mean that there is no
overlapI am not expecting one model to be a superset of the other,
but I am expecting some sort of overlap between 'interface'
implementation and type class instance declaration.
-Original Message-
From: Bulat Ziganshin [mailto:[EMAIL PROTECTED]
Sent: 03 January 2008 10:54
To: Nicholls, Mark
Cc: Bulat Ziganshin; haskell-cafe@haskell.org
Subject: Re[2]: [Haskell-cafe] Is there anyone out there who can
translate C# generics into Haskell?
Hello Mark,
Thursday, January 3, 2008, 1:22:26 PM, you wrote:
because they have different models. i recommend you to start from
learning this model, otherwise you will don't understand how Haskell
really works and erroneously apply your OOP knowledge to Haskell data
structures.
shortly said, there are 3 ways to polymorphism:
1) C++ templates - type-specific code generated at compile time
2) OOP classes - every object carries VMT which allows to select
type-specific operation
3) type classes - dictionary of type-specific operations is given as
additional hidden argument to each function
Haskell uses t.c. and its abilities are dictated by this
implementation. there is no simple and direct mapping between
features provided by OOP and t.c.
Can you give me a summary of why it's meaningless.both would seem
to
describe/construct values/objectsthey may not be equivalent, but I
would expect some considerable overlap.
-Original Message-
From: Bulat Ziganshin [mailto:[EMAIL PROTECTED]
Sent: 02 January 2008 20:29
To: Nicholls, Mark
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Is there anyone out there who can
translate
C# generics into Haskell?
Hello Mark,
Wednesday, January 2, 2008, 7:40:31 PM, you wrote:
I'm trying to translate some standard C# constucts into Haskell...
some
it's meaningless. read
http://haskell.org/haskellwiki/OOP_vs_type_classes
and especially papers mentioned in the References
--
Best regards,
Bulatmailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe