DEV Community

Discussion on: Tips on naming boolean variables - Cleaner Code

Collapse
 
bsides profile image
Rafael Pereira

Purely linguistically, you don't say "If am I a developer". You say "If I am a developer".

In english, a sentence beginning with a verb is a question most of the time. So for foreigners, it's a no brainer a variable starting with a questioning verb is a boolean.

I get it that native english speakers don't really talk the way the grammar is technically but this is how non native people learn the language, by learning and studying grammar first. And reading is different than speaking. We're reading code every day, not speaking. To simply ignore it because of use is a cultural thing and not really in the rules of the language.

Just my thoughts and point of view, from other perspective, to add to the conversation. But in the end of the day, it's good to be consistent. That's all.