Non-H98 crusade, contd.

Dylan Thurston dpt at lotus.bostoncoop.net
Sat Mar 12 17:08:05 EST 2005


On Mon, Feb 28, 2005 at 01:45:25PM +0000, Malcolm Wallace wrote:
> As examples of language features that should be removed or revised,
> how about these:
>   (a) n+k patterns
>   (b) the defaulting mechanism
>   (c) the monomorphism restriction

(b) is annoying, but I don't see an alternative now.  Removing the
defaulting mechanism would be very backwards-incompatible, and require
a lot of type signatures in annoying places.  For instance, any time
you exponentiate using ^ or ^^ and a literal exponent, like

 f x = x^2

you have to specify the type of '2' if you don't have defaulting.

I encountered this with my proposed replacements for the numeric
classes, where defaulting is necessarily broken.  Usually it's not so
much of an issue and only requires a small number of explicit types;
this is the one instance where it really interferes.

I'd be happy to have a better solution.

Peace,
	Dylan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/libraries/attachments/20050312/052ba2fa/attachment-0001.bin


More information about the Libraries mailing list