[Haskell-cafe] Language complexity & beginners (Was: New type of ($) operator in GHC 8.0 is problematic)
Daniel Gorín
dgorin at dc.uba.ar
Sun Feb 7 15:56:25 UTC 2016
> On 7 Feb 2016, at 2:59 pm, Richard Eisenberg <eir at cis.upenn.edu> wrote:
>>
>> 2, ($) has had a fib in its type for a very long time, but did it ever
>> hurt anyone? The closest I saw was a generalized concern about it
>> being bad when people report a bug and then hear that things are more
>> general than they thought and I guess this makes their bug not a bug
>> or something? Results in some confusing back-and-forth? It would be
>> nice to get more specific about how much trouble the ($) lie has
>> caused.
>
> I don't have data, but there is a real cost to lying. It shows up in the slow-ish but steady stream of posts / questions / bug reports that are produced saying something is weird. I've seen a good number of these come up in my years in the Haskell community. I'll note that there is also a real cost to telling the truth: witness this thread. This all adds up to a need to do both, which is what we would get by having a richer REPL environment.
This reminds a lot of the FTP controversy and I feel that here too we could side step the problem by allowing modules to re-export type-specialized versions of imported symbols. E.g., Data.Function could define ($) with the new type, Prelude would re-export it with the old type (as a specialization) and anyone who needs to use the more general version would have to opt-in by importing Data.Function. In terms of documentation, the haddock version of (Data.Function.$) would show the more general type while the haddock for Prelude would show the current type (ideally with a link to the more general one).
More information about the Haskell-Cafe
mailing list