[Webkit-unassigned] [Bug 125988] Precede boolean values with words like "is" and "did".

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 19 23:14:05 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=125988


Gergő Balogh <geryxyz at inf.u-szeged.hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |galpeter at inf.u-szeged.hu,
                   |                            |ossy at webkit.org




--- Comment #3 from Gergő Balogh <geryxyz at inf.u-szeged.hu>  2013-12-19 23:12:08 PST ---
(In reply to comment #2)
> (From update of attachment 219641 [details])
> This doesn’t seem like something the style checker can correctly check without linguistic analysis. For example, "requiresHeader" is a perfectly good name for a boolean. And "isRequiresHeader" is bad.

My opinion  is that every phrase in English (which has a truth-value) can be rephrase to begin with 'is' or 'did'. requiresHeader --> isHeaderRequired. Of course I am not a native speaker so it's may be wrong, but suppose it's true.
I always prefer the more formal notion over the others, but not over readability. So I think the key question here is not that is the 'is-free' form grammatical correct, rather do the 'is-form' help the reader or the code writer to understand the code.

An additional thought. If you use some kind of auto-completion tool and you know that every bool variable start with 'is', you can look for it, even you don't know the exact phrase that the developer used. We seen this before for example in the case of getters and setters in Java (getSomething(), setSomething()).

Of course these are only my opinion.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list