DEV Community

Discussion on: Back to basics: Naming

Collapse
 
bertilmuth profile image
Bertil Muth

Usually isEmailValid cause it‘s a common convention for functions/methods that return Boolean, and thus will behave predictably for readers.

For the requirements as code project, I would use emailIsValid, as this is the closest you can get to speaking (when email is valid, do this). And I use that to generate documentation from the code.

So there are sometimes reasons to break from the norm.