variablesbooleannaming

Is using "is" to name Boolean variables bad practice?


Is naming Booleans that start with "is" bad practice now? My manager believes that "isAnything" is outdated and poor practice. Is this true?

myManager.isLame ? correct() : incorrect();

Solution

  • It's used quite often in a lot of languages, but I don't know if it can be said with certainty that it's the preferred method.

    I think consistency and everyone on a given team using the same standards/styles is the important thing to bear in mind.