From: Gary Wright Date: 2011-10-12T04:50:46+09:00 Subject: Re: why does `a + f b` not parse? On Oct 11, 2011, at 10:17 AM, Bartosz DziewoƄski wrote: > Yes, I think we all know that; the question is, why does 2 + sqrt(5) > parse, but 2 + sqrt 5 does not? I've been wondering this myself - is > that syntax somehow ambiguous? Bottom line is that operators have a higher precedence than argument list construction. Let's rewrite the original code with parens showing this: (2 + sqrt) 5 Two adjacent expressions with just white space between them is not valid. Thus the complaint about the unexpected integer. For the original code to be interpreted meaningfully the parser would have to prefer the following precedence: 2 + (sqrt 5) which creates its own problems because now expressions can't easily be used in argument lists: foo 3 + 4, 5 gets parsed as (foo(3) + 4), 5 rather than foo(3 + 4, 5) Bottom line is that operators have a higher precedence than argument list construction. Gary Wright