On Wed, 31 May 2000, S.D.Mechveliani wrote:
> And we can hardly invent the mode type better than Char,
> because any specially introduced mode types bring the long names.
>
> quotRem 'n' x (-3) looks better than the pair quotRem & divMod,
> and
> quotRem QuotRemSuchAndSuch x (-3)
> looks worse than quotRem & divMod.
On the contrary - you only need one character N instead of threee 'n' if
you use a datatype with two constructors N and (whatever you like for
the other case).
But the length of the argument is not that interesting here - you can have
long names for the constructors of the "mode" datatype and still use short
local abbreviations.
A better argument against Char is that the type too big - there are only
two variants of the functions, but 256 (or rather 65536 (Unicode))
characters in the argument type.
Kind regards,
Patrik Jansson