At this time I haven't switched the %~ operators from %. I will miss the consistency that operator= or operator~ applies the operator to the target of the lens, like how += applies (+) to the target of an l-value, in this case, but i think it'd be silly to try too hard to be consistent across every use of % in lens and that %= for mod-equals still reads better than &=, which _is_ used in lens for bitwise .&. in data.bits.lens mosty because .&.= is silly looking ;)<div>
<div><br></div><div>-Edward<br><br><div class="gmail_quote">On Tue, Nov 20, 2012 at 1:46 PM, John Wiegley <span dir="ltr"><<a href="mailto:johnw@fpcomplete.com" target="_blank">johnw@fpcomplete.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">>>>>> Edward Kmett <<a href="mailto:ekmett@gmail.com">ekmett@gmail.com</a>> writes:<br>
<br>
> We had switched to % from (|>) to be consistent with the other (+=) (*=)<br>
> operators where (%=) was being read as 'mod-equals' as a bit of a pun, and<br>
> could be seen as the application of the % operator to the target. <br>
<br>
</div>Yes, a strong positive in favor of & of |> is that it allows the lens library<br>
to offer the highly useful variants &= and &~, which have obvious (and<br>
related) meanings to someone using lens. |>= and |>~ would get a bit awkward<br>
in comparison.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
John Wiegley<br>
FP Complete Haskell tools, training and consulting<br>
<a href="http://fpcomplete.com" target="_blank">http://fpcomplete.com</a> johnw on #haskell/<a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a><br>
</font></span><div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div></div>