<div dir="ltr">On the other hand, it's unusual, at least in my mind, for "plus" to be used as notation for an operation which is noncommutative. (++) is something else of course...<div><br></div><div>While I can see moving in that direction being reasonable the migration path is a political nightmare as Edward points out.</div><div><br></div><div>I'm *reasonably* happy with the status quo, apart from the fact that I need to be careful a little too often whether (<>) refers to the Semigroup or Monoid operation at the moment. Moving Semigroup into base and getting those two unified would be nice. But this is really all more of a libraries issue than a language issue.</div><div><br></div><div>I'd actually be happy to move almost all discussion of libraries out of the Report proper, aside from what's minimally required in order to talk about the meaning of language constructs (e.g. you need Bool to talk about if-expressions, and Monad in order to discuss do-expressions, and various bits and pieces like Storable in order to discuss FFI).</div><div><br></div><div>To whatever extent it can, The Report should tell us all the stuff about the meaning of code that reading the libraries can't tell us.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 4 Jul 2017 at 03:33 Vassil Ognyanov Keremidchiev <<a href="mailto:varosi@gmail.com">varosi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">"plus" symbol is natural denoting joining two pieces in almost all languages. That is why I would like not to get rid of it, but to be a bit more general. So in new code that will use the new prelude to be able to use it on broader range of containers (monoids/semigroups).<br><br>I really mean:<br>(++) :: Semigroup s => s -> s -> s<br><br>About the fixity, it could retain it's original fixity.</div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-04 3:24 GMT+03:00 Edward Kmett <span dir="ltr"><<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@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">Note: I realize nobody is directly saying that we should use (++) instead of (<>) in this conversation just yet, but I want to clear a few things up.<div><br></div><div>One of the early options when the operator (<>) was coined was to try to say we should just generalize the type of (++) instead to make it mappend. (Note: it originally was mplus, in a Haskell version long long ago, so it keeps getting repurposed!) Unfortunately, this plan ran afoul of the fact that the primary libraries using the (<>) notation at the time (pretty printing libraries) also mixed it heavily with (++), exploiting the different fixities involved. (Finding a decent fixity for (<>) was a huge chunk of the conversation at the time.)</div><div><div><br></div><div>There is a deliberate fixity difference between (++) and (<>), a good chunk of code out there mixes them that deals with pretty printing that would break pretty horribly if we just outright removed (++), and trying to do a visual search and replace for (++) with (<>) in light of them having different fixities is a very error prone process, so we aren't currently planning on deprecating the existing (++) operator any time soon. At least, nobody has put a proposal to the core libraries committee to that end.<br></div><div><br></div><div>Since the call was made to make (<>) become the new operator, we ultimately decided to leave (++) untouched, even though it could be generalized to match (<>), for much the same reason that map still exists, despite there being a more general fmap: Ultimately, there isn't a reasonable migration plan to make (++) or map become the way you define the instance involved, and at least this way the name duplication can be leveraged by the folks who want a less polymorphic combinator.</div><div><br></div></div><div>Would the world be a little tidier without map or (++) hanging about? Sure. But the hate mail levels in my inbox would skyrocket commensurately. ;)</div><span class="m_1393239960255517628HOEnZb"><font color="#888888"><div><br></div><div>-Edward</div></font></span></div><div class="m_1393239960255517628HOEnZb"><div class="m_1393239960255517628h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 3, 2017 at 5:01 PM, Erik de Castro Lopo <span dir="ltr"><<a href="mailto:mle+hs@mega-nerd.com" target="_blank">mle+hs@mega-nerd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Vassil Ognyanov Keremidchiev wrote:<br>
<br>
> What do you think of making (++) the same as (<>) so we could use ++ as<br>
> concatenation of any monoid, not just lists in Haskell 2020?<br>
> This will be more intuitive for beginners, too.<br>
<br>
</span>Two symbolic operators that are synonymous seems a bit of a waste. I would<br>
much rather see (++) be deprecated in favour of (<>). At work we have a<br>
custom prelude which already does this.<br>
<span class="m_1393239960255517628m_-8013076223022259686HOEnZb"><font color="#888888"><br>
Erik<br>
--<br>
----------------------------------------------------------------------<br>
Erik de Castro Lopo<br>
<a href="http://www.mega-nerd.com/" rel="noreferrer" target="_blank">http://www.mega-nerd.com/</a><br>
</font></span><div class="m_1393239960255517628m_-8013076223022259686HOEnZb"><div class="m_1393239960255517628m_-8013076223022259686h5">_______________________________________________<br>
Haskell-prime mailing list<br>
<a href="mailto:Haskell-prime@haskell.org" target="_blank">Haskell-prime@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Haskell-prime mailing list<br>
<a href="mailto:Haskell-prime@haskell.org" target="_blank">Haskell-prime@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
Haskell-prime mailing list<br>
<a href="mailto:Haskell-prime@haskell.org" target="_blank">Haskell-prime@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime</a><br>
</blockquote></div>