
16 Jun
2007
16 Jun
'07
1:27 p.m.
Hello bf3, Saturday, June 16, 2007, 3:24:06 PM, you wrote:
However, I never understood why Haskell doesn't permit the same name for a function acting on different types, even without using type classes. Must be some deeper reason for it (currying?)
i guess because it makes type inference problematic. imagine 10 overloaded functions used together: func = a.b.c.d.e.f.g.h.i.j it will create 2^10 variants to check and make error messages very verbose (or non-informative). with type classes, you give common name to all the type variants you want to overload. at least, this simplifies error messages :) -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com