<div dir="ltr">I like this argumentation! Consistency is really the most valuable property!<div><br></div><div>Which contra-arguments is? </div><div><br></div><div>> It is unintuitive { maximum (100,4) == 4; length (1,2) == 1 }</div><div>>> Intuition could be different. If we understand asymmetry of tuple than it is completely natural.</div><div><br></div><div>> It is hard to explain to students</div><div>>> You don't need to explain it. Tuples are one of the first things to discuss. No classes in scope yet. Later when you go through (Functor, Applicative) to (Foldable, Traversable) there will be no problem.</div><div><br></div><div>> It is useless</div><div>>> I suppose that use cases are close to use cases for Functor instances.  </div><div><br></div><div>> It provoke to use tuples extensively</div><div>>> I don't think that exactly these instances provoke this. </div><div><br></div><div>> It can produce errors in runtime</div><div>>> Yes, and so avoid tuples in most cases. These instances just provoke not to use tuples! </div><div><br></div><div>What else?</div><div><br></div><div>I suppose that either tuples are symmetric and have no Functor instances or they are assymetric with all consequences.</div><div><br></div><div>And there is absolutely no reason to change natural class hierarchy due to imaginary newbie confusion.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-25 11:43 GMT+03:00 Index Int <span dir="ltr"><<a href="mailto:vlad.z.4096@gmail.com" target="_blank">vlad.z.4096@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">This is getting ridiculous. The main problem with the `Foldable` instance for tuples seems to be that it's asymmetric (takes only the second element into account). Yet tuples are already asymmetric given their `Functor` instance! No one seems to complain about that although for a beginner it's a total WAT (judging from my own experience and people that I explained Haskell to). Why does `succ <$> (1, 2)` evaluate to `(1, 3)` and not `(2, 3)`? Current definitions are entirely consistent, and consistency is the most valuable property.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">And given that `Traversable` gives a rise to a `Foldable` similarly to how a `Monad` gives a rise to an `Applicative`, it is the same stupid mistake not to reflect this relation in the type system.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The ship has sailed, but not when the `Foldable` instance defined. It has sailed when the `Functor` instance was defined, everything else is a follow-up. Just get over it already.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 11:28 AM, Jeremy <span dir="ltr"><<a href="mailto:voldermort@hotmail.com" target="_blank">voldermort@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Several suggestions have been made in this thread. The one with the highest<br>
cost-to-benefit ratio would seem to be removing the Foldable constraint from<br>
Traversable, as it is simply not required by the Traversable definition.<br>
Lennart actually tried recompiling base with this "and it hardly needed any<br>
changes".<br>
<br>
I suggest that we consider this change first, as it brings the benefit of<br>
allowing Traversable types without having to define possibly nonsensical<br>
Foldable instances, and according to Lennart's experiment, has trivial<br>
impact.<br>
<br>
Lennart, what changes did you have to make? Anybody care to recompile their<br>
pet project with this change and see if there's any significant impact?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://haskell.1045720.n5.nabble.com/Proposal-Add-conspicuously-missing-Functor-instances-for-tuples-tp5827530p5831008.html" rel="noreferrer" target="_blank">http://haskell.1045720.n5.nabble.com/Proposal-Add-conspicuously-missing-Functor-instances-for-tuples-tp5827530p5831008.html</a><br>
Sent from the Haskell - Libraries mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>