I'm a strong +1 for accepting this proposal as it stands.<div><br></div><div>I'm decidedly lukewarm / a weak -1 on switching it to (|>). </div><div><br></div><div><div>Another popular color of this bikeshed, (#) as is used in diagrams, interacts very poorly with MagicHash and has a very high precedence that ruins it for most dsl purposes.</div>
</div><div><br></div><div>We had it as (|>) in lens for a while and it didn't read well. It is often used in long compositions and the extra character adds up when chained several times.</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-size:11.818181991577148px;font-family:Consolas,'Liberation Mono',Courier,monospace;color:rgb(51,51,51);line-height:14.545454025268555px">
<div class="line" id="LC43" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="c1" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- >>> zipper ("hello","world") & down _1 & fromWithin traverse & focus .~ 'J' & rightmost & focus .~ 'y' & rezip</span></div>
<div class="line" id="LC44" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="c1" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- ("Jelly","world")</span></div>
<div class="line" id="LC44" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="c1" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic"><br></span></div><div class="line" id="LC44" style="margin:0px;padding:0px 0px 0px 10px;border:0px">
<span class="c1" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-family:Consolas,'Liberation Mono',Courier,monospace;color:rgb(51,51,51);font-style:normal">
<div class="line" id="LC211" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="nf" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">isoRules</span> <span class="ow" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="n" style="margin:0px;padding:0px;border:0px">defaultRules</span></div>
<div class="line" id="LC212" style="margin:0px;padding:0px 0px 0px 10px;border:0px"> <span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold">&</span> <span class="n" style="margin:0px;padding:0px;border:0px">handleSingletons</span> <span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold">.~</span> <span class="kt" style="margin:0px;padding:0px;border:0px;color:rgb(68,85,136);font-weight:bold">True</span></div>
<div class="line" id="LC213" style="margin:0px;padding:0px 0px 0px 10px;border:0px"> <span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold">&</span> <span class="n" style="margin:0px;padding:0px;border:0px">singletonRequired</span> <span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold">.~</span> <span class="kt" style="margin:0px;padding:0px;border:0px;color:rgb(68,85,136);font-weight:bold">True</span></div>
<div class="line" id="LC214" style="margin:0px;padding:0px 0px 0px 10px;border:0px"> <span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold">&</span> <span class="n" style="margin:0px;padding:0px;border:0px">singletonAndField</span> <span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold">.~</span> <span class="kt" style="margin:0px;padding:0px;border:0px;color:rgb(68,85,136);font-weight:bold">True</span></div>
</pre></span></div><div class="line" id="LC44" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div></pre></div><div>Both of those examples read much better with & than (|>). </div><div><br></div><div>We had switched to % from (|>) to be consistent with the other (+=) (*=) operators where (%=) was being read as 'mod-equals' as a bit of a pun, and could be seen as the application of the % operator to the target. </div>
<div><br></div><div>However this led to issues with a vocal minority who objected to it changing the meaning of 4 % 3 on lambdabot when combined with NumInstances.</div><div><br></div><div>We converted to (&) because of its incredible terseness and general lack of use across hackage. For DSL purposes, to me it is key that this operator be as succinct as possible and (&) is remarkably underutilized in haskell libraries today, due to the fact that (|) is taken by syntax, and our C-inspired brains tend to pair them.</div>
<div><br></div><div>-Edward</div><div><br><div class="gmail_quote">On Tue, Nov 20, 2012 at 1:27 PM, Michael Sloan <span dir="ltr"><<a href="mailto:mgsloan@gmail.com" target="_blank">mgsloan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And the results of the IRC discussion on lens: <a href="https://github.com/ekmett/lens/issues/100" target="_blank">https://github.com/ekmett/lens/issues/100</a><br>
<br>I do think that this looks nicer, for whatever reason. While the mnemonic of "mod"ulus can suggest modify once you know that, (&) somewhat naturally suggests "and then" ... "and then". I still prefer (#) for overall consistency and history, but other than its conjunction connotations, (&) is mnemonically better.<br>
<br>It'll be funny to mix diagrams and lens code - (&) is used for sticking coordinates together for points / vectors - while (#) would stand in for (&).<div class="HOEnZb"><div class="h5"><br><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Tue, Nov 20, 2012 at 10:17 AM, Michael Sloan <span dir="ltr"><<a href="mailto:mgsloan@gmail.com" target="_blank">mgsloan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(#) is also used by the diagrams library, mainly for using functions as if they were "attributes".<br><br>In the context of lens, this is discussed a bit here: <a href="https://github.com/ekmett/lens/issues/17" target="_blank">https://github.com/ekmett/lens/issues/17</a><div>
<div><br>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 20, 2012 at 9:31 AM, Stephen Tetley <span dir="ltr"><<a href="mailto:stephen.tetley@gmail.com" target="_blank">stephen.tetley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">"Haskell" called this operator (#) about 12 years ago - see Peter<br>
Thiemann's WASH and Eric Meijer and colleagues MS Agent scripting.<br>
<br>
I'd much prefer (#) if it didn't interfere with GHC's magic hash, I<br>
suspect the above authors were using Hugs...<br>
<div><br>
On 20 November 2012 17:19, Dan Burton <<a href="mailto:danburton.email@gmail.com" target="_blank">danburton.email@gmail.com</a>> wrote:<br>
> Just to bring up some prior art, from what I've heard, F# calls this |>.<br>
<br>
</div><div><div>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div>
</div></div></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://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>