Naming booleans
Posted
by wrongusername
on Stack Overflow
See other posts from Stack Overflow
or by wrongusername
Published on 2010-03-26T21:31:14Z
Indexed on
2010/03/26
21:33 UTC
Read the original article
Hit count: 546
If I only want to check if something is impossible or not (i.e., I will not be using something like if(possible)), should I name the boolean notPossible and use if(notPossible) or should I name it possible and use if(!possible) instead?
And just to be sure, if I also have to check for whether it is possible, I would name the boolean possible and use if(possible) along with else, right?
© Stack Overflow or respective owner