Roberto@mujico.orgtoAsklemmy@lemmy.ml•I know that naming variables is one of the biggest unsolved problems of Computer Science but how would you name a boolean flag to be self explanatory?
2·
6 months agoI think I see what you mean, you have two states and kind of opposite but you usually name the variable after one of them, so you have to “guess” the other one. For instance you could have isRightHand, the opposite state being left hand, but from the variable name you can’t be sure if it could be “not right hand” as in right foot or something like that. Man it’s kind of difficult to come up with examples.
Had me until the yeast.