<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">Is it confusing to newcomers that (.) doesn't bind tighter than ' ' in haskell? Sure. But causing that to randomly change back and forth is more confusing still.</span></blockquote><div><br></div><div>It already does randomly change back and forth though, due to module syntax. With the proposed option turned on, the change seems *less* random to me, being solely based on whitespace and not *also* based on whether the LHS is a module name.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">-- Dan Burton</div></div>
<br><div class="gmail_quote">On Wed, Nov 4, 2015 at 12:20 PM, Edward Kmett <span dir="ltr"><<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Precedence and syntax in a language tells you a lot about what the language considers important. We take the 'quietest' syntax for things that we want to have fade into the background. Whitespace and periods are both very quiet syntax.<div><br></div><div>In math ' ' is often multiplication, in the lambda calculus it is function application.</div><div><br></div><div>We choose ' ' to have the tightest precedence in Haskell in a way that nicely emphasizes the importance of functions here. Admittedly we already have two awkward exceptions there that routinely throw folks for loops. @ syntax in patterns and the {}'s used by record syntax both bind tighter than whitespace application.</div><div><br></div><div>We choose . for function composition a.) because it on the keyboard and again, it emphasizes the importance of functions. Functions compose and you can make more interesting things out of the parts, the field accessor syntax you propose here does not compose particularly well.</div><div><br></div><div>With other solutions available today that this proposal actively makes worse, I can both read and write back to those fields</div><div><br></div><div>You're asking for (.), one of the most common symbols in Haskell code today to take on another meaning, furthering confusion for its current standard role, for it to effectively alternate binding looser than ' ' when you put spaces around it to tighter than ' ' when you don't while simultaneously changing semantics entirely.</div><div><br></div><div>Is it confusing to newcomers that (.) doesn't bind tighter than ' ' in haskell? Sure. But causing that to randomly change back and forth is more confusing still.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Edward</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 2:40 PM, Harry . <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">When you consider that every other programming language in common use (and almost every language not in common use as well) allows you to write:<br>
<br>
print <a href="http://person.name" rel="noreferrer" target="_blank">person.name</a><br>
<br>
while Haskell requires something like:<br>
<br>
print (person & name) or<br>
<br>
print $ person.^name<br>
<br>
and even that after importing a third-party library or defining it yourself, you begin to understand why beginners think that Haskell looks more like Japanese emoticons than programming.<br>
<div><div><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>
</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://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>