Let's say I have a boolean condition a AND b OR c AND d
and I'm using a language where AND
has a higher order of operation precedentprecedence than OR
. I could write this line of code:
If (a AND b) OR (c AND d) Then ...
But really, that's equivalent to:
If a AND b OR c AND d Then ...
Are there anycompelling arguments in forfavor or against including the extraneous parentheses? Does
Does practical experience suggest that it is worth including them forsignificantly improves readability? Or
Or is itwanting them a sign that a developer really needs to really sit down and become confidentconversant in the basics of their language?