News for hackers. Stuff that matters.
Re:Tim Bray doesn't know operator precedence rules by almost on Wednesday June 30, 2010 @07:42AM (#1474516)
Writing code that way I can understand. But it's kind of useful to be able to read other peoples code and know what it does.

Also, "1 + 2 * 3" is quite obviously 6 and not 9 in languages with operator precedence, I really don't think you need to write "1 + (2 * 3)".

Everything in moderation.

EDIT: hahaha, well I feel stupid. I'm leaving the incorrect answer there because it's too funny not to :)

Re:Tim Bray doesn't know operator precedence rules by jsn on Wednesday June 30, 2010 @07:51AM (#1474536)
it's neither 6 nor 9 there, actually :) it's 7.
Re:Tim Bray doesn't know operator precedence rules by almost on Wednesday June 30, 2010 @07:56AM (#1474547)
You clearly don't understand the advanced kind of maths I'm doing there ;)
Re:Tim Bray doesn't know operator precedence rules by ramchip on Wednesday June 30, 2010 @08:28AM (#1474610)
Haskell to the rescue!

    ghci> let f = let 2*3=5 in 1+2*3
    ghci> f
    6
Re:Tim Bray doesn't know operator precedence rules by vijaydev on Wednesday June 30, 2010 @11:10AM (#1475050)
brilliant!
Re:Tim Bray doesn't know operator precedence rules by jonsen on Wednesday June 30, 2010 @07:52AM (#1474537)
"1 + 2 * 3" is quite obviously 6

Obviously ;)

Re:Tim Bray doesn't know operator precedence rules by jleyank on Wednesday June 30, 2010 @08:58AM (#1474672)
Agree. This is provably true for large values of 6.
Re:Tim Bray doesn't know operator precedence rules by astine on Wednesday June 30, 2010 @07:54AM (#1474541)
You mean 7, right?