<div dir="ltr"><div>> If precedence is not intuitively clear then its badly written code. It's not the fault of the reader.</div><div><br></div><div>I think this is a subjective choice. I will assume that a reader understands that `1 + 2 * 3 = 7'. If he doesn't I think he really ought to take the time and learn the precedences. Some precedences are obvious if you know the types involved; `a + b && c` can not equal `(a + b) && c` in a working Haskell program, here you just need to know the types to figure it out.</div><div><br></div><div>A reader will never know the precedence of an expression with operators he is not familiar with but this shouldn't necessarily dictate how you write your code. This generalizes to a lot of decisions you need to make while programming.</div><div><br></div><div>I'd recommend to start by learning precedences of operators in Prelude and then continuing with the rest of base. The combinations of function application (space), function composition (.), and ($) are very important to know by heart.</div><div><br></div><div>If you come across an operator you aren't familiar with learn it by experimenting or looking it up. Try to parenthesize or unparenthesize, also for code you write yourself. You will build an intuition as you go.</div><div><br></div><div>Cheers,</div><div>Adam</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Oct 22, 2016 at 11:35 PM Tom Ellis <<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Oct 22, 2016 at 02:58:35PM -0400, Steven Leiva wrote:<br class="gmail_msg">
> I still don't think I'd be able to figure out "where the parenthesis go" if<br class="gmail_msg">
> I was given a new expression with functions / operators with 3 or 4<br class="gmail_msg">
> different declared precedences. For a beginner, is that a huge problem, or<br class="gmail_msg">
> is knowledge of the concept enough?<br class="gmail_msg">
<br class="gmail_msg">
If precedence is not intuitively clear then its badly written code.  It's<br class="gmail_msg">
not the fault of the reader.<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Haskell-Cafe mailing list<br class="gmail_msg">
To (un)subscribe, modify options or view archives go to:<br class="gmail_msg">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br class="gmail_msg">
Only members subscribed via the mailman list are allowed to post.</blockquote></div>