Is or Are to prefix boolean values

Posted by Brian T on Stack Overflow See other posts from Stack Overflow or by Brian T
Published on 2010-04-22T14:02:02Z Indexed on 2010/04/22 14:13 UTC
Read the original article Hit count: 186

Filed under:

When naming a boolean, or a function returning a boolean it's usual to prefix with 'is' e.g.

  • isPointerNull
  • isShapeSquare

What about when refering to multiple items, should it be:

  • arePointersNull or isPointersNull
  • areShapesNull or isShapesNull

I can see arguments for both; is offers consistency and perhaps slightly better readability, are makes the code read in a more natural way.

Any opinions?

© Stack Overflow or respective owner

Related posts about coding-standards