note
calin
<p>
Two comments:
</p>
<blockquote><em>
If, like me, you don't come from a comp-sci background, then precedence-awareness of operators probably only goes as far as knowing that <code>3*2+1</code> means <code>(3*2)+1</code>, and that if you want <code>3*(2+1)</code>, then you'd better damn well say so.
</em></blockquote>
<p>
I think putting the addition first (to the left) in your example illustrates the concept of <em>precedence awareness</em> better. Like: <code>1+3*2</code> is actually <code>1+(3*2)</code> and not <code>(1+3)*2</code>.
</p>
Second comment: A short paragraph about the C-istic awkward precedence of some operators might be helpful to beginners without a C background. <code>$x == $y & $z</code> means <code>($x == $y) & $z</code>. Enabling warnings catches this btw.
</p>
587193
587193