Comment

Comment by kevingadd

The precedence rules are terrifying. I get it, but:

> 3/6*4 is 2 while 3 / 6*4 is 1/8 since the spacing turns the / into a division operator. Use parentheses or spaces to disambiguate: 3/(6*4) or 3 /6*4.

having to be up-front as a warning feels like a sign that your approach to precedence is fundamentally broken and you should require parentheses. (Also the idea that 1/8 and 1 / 8 are different things feels bonkers to me in general, but maybe that's just taste.)

parent kevingadd 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton