3 ms·
Borrowing the variable examples from another comment, do you believe that the former is easier to understand for someone who knows English grammar than the latt
by ummonk 8y ago
Borrowing the variable examples from another comment, do you believe that the former is easier to understand for someone who knows English grammar than the latter? (I'm using Python syntax since we're going for English-like readability and added parantheses to the boolean operation to indicate order of operations for the liberal arts major that we've decided is the target audience of this code):
if isAdmin:
return false
if not isActive:
return false
return true
vs
return (not isAdmin) and isActive