On 07/24/2013 09:27 AM, Alan McKinnon wrote:
> 
> I think it's the former. But I've been known to be wrong on things
> (lately, more often than not...)
> 
> Just looked on The Google, and there's no consensus I can find. Best
> advice seems to be that union and difference are equal precedence so the
> expression is evaluated left to right.
> 
> Hence it's the former :-)

You can rewrite (A \\ B) as (A && !B), giving you one less case to worry
about.

But, some people (most notably, programming languages) assign a higher
priority to intersection (&&) than they do to union (||). Of course,
mathematically, they should probably have the same priority, so many
people do the left-to-right thing.

So in practice, you'd better use parentheses if you want anyone to know
WTF you're talking about.


Reply via email to