Boolean Attributes' Names Should Have '?' Suffix #2

Closed
runpaint opened this Issue Apr 20, 2009 · 1 comment

2 participants

@runpaint

When we generate method names for an object we should use a ‘?’ suffix if the attribute is boolean. For example, a Repository object should have a .fork? and a .private? method. This is not only a better reflection of conventions, it also disambiguates between, in this example, ‘fork’ being a verb, i.e. a method which causes the repository to be forked, and ‘fork’ being an attribute, i.e. indicating whether the repository has been forked.

@fcoury
Owner

runpaint, can we consider this one closed?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment