[Haskell-cafe] typeclass question

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Thu Sep 11 06:37:48 EDT 2008


> If there is no algorithm that becomes more generic by the use of a type
> I would not use a type class, but stick to labelToRenderable [...]

The problem with function names as "labelToRenderable"
is that they have type information as part of the name.

Consistency of that information cannot be enforced by the language,
which makes it dangerous.

If you want type information
(e.g. to resolve overloading, for the compiler - and for the reader!)
use the language, and write a type annotation.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080911/e848a480/signature.bin

More information about the Haskell-Cafe mailing list