Deprecate Foldable for Either
Andreas Abel
abela at chalmers.se
Fri Mar 3 19:45:30 UTC 2017
> But it is not true for ...
> *uses* of a polymorphic function
Which is confirmed by the present casus. The new highly polymorphic
concat is a versatile weapon to shoot yourself in the foot.
(However, the weapon designer can sleep even more soundly now in the
confidence that his product does not malfunction.)
Anyway, for what it's worth, I retreat my proposal (or "proposal").
Sh*t has happened.
A monomorphic List library would make sense, though.
On 03.03.2017 18:48, Richard Eisenberg wrote:
>
>> On Mar 3, 2017, at 12:45 PM, Kris Nuttycombe
>> <kris.nuttycombe at gmail.com <mailto:kris.nuttycombe at gmail.com>> wrote:
>>
>> This is an interesting assertion; I don't believe that these goals
>> work against one another at all. In fact, I find that (b) leads to "if
>> it compiles, it works" much more often than not. John De Goes goes
>> into depth on this principle
>> here: http://degoes.net/articles/insufficiently-polymorphic where he
>> points out "Monomorphic code is much more likely to be incorrect than
>> polymorphic code, because for every type signature, there are many
>> more possible implementations.".
>
> Ah -- very good point. This is true for the *implementation* of a
> polymorphic function, where a polymorphic type signature beautifully
> restricts what the function can do. But it is not true for monomorphic
> *uses* of a polymorphic function, where the generality can lead to an
> unexpected instance selection and thus runtime behavior.
>
> Richard
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
--
Andreas Abel <>< Du bist der geliebte Mensch.
Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden
andreas.abel at gu.se
http://www.cse.chalmers.se/~abela/
More information about the Libraries
mailing list