The dreaded M-R

lennart at augustsson.net lennart at augustsson.net
Mon Jan 30 17:06:29 EST 2006


Quoting Andrew Pimlott <andrew at pimlott.net>:

> On Mon, Jan 30, 2006 at 04:45:56PM -0000, Simon Marlow wrote:
>> Given the new evidence that it's actually rather hard to demonstrate any
>> performance loss in the absence of the M-R with GHC, I'm attracted to
>> the option of removing it in favour of a warning.
>
> I caution against the hope that warnings will contribute to the
> solution, whichever side you're on.  This is a general argument:  Either
> the warning is on by default or off.  If off, it does no harm, but
> doesn't help much either.  If on, it either triggers only on code that
> is almost certainly wrong (or easily disambiguated), or it sometimes
> triggers on perfectly good code.  In the former case, it would be better
> to make it illegal (or require the disambiguation).  In the latter,
> nobody likes disabling warnings, so they'll grumble and change the code
> instead.
>
> In the present case, people aren't (only) opposing the M-R out of
> principle, but because they actually use overloaded variable definitions
> and (at least sometimes) want to leave off the signature.  So I don't
> see how one could claim, as on the wiki, the warning "wouldn't happen
> much".  I suspect it would happen, and annoy people, and defeat the
> reason that people want to remove the M-R.
>

So I envisage that you'd turn off the warning in the same way as
you turn off the M-R today: by a type signature.  If you write the
type you pretty much show that you know that you're doing something
special.

    -- Lennart




More information about the Haskell-prime mailing list