8
votes
Common practice where to place "is" word while naming predicate function: at the beginning or in the middle?
This inconsistency is a combination of things:
Language designers are not required to adopt naming conventions from other languages when inventing a new programming language.
Naming conventions have ...
5
votes
Common practice where to place "is" word while naming predicate function: at the beginning or in the middle?
One main reason might be that the "noun" in your hypothetical examples is a variable or an expression on which the predicate is applied, so it would be redundant to specify it in the name of ...
5
votes
Accepted
Naming multiple Entities of same collection (with different sets of fields, few less, few more)
Is there any convention to call an entity that does the latter?
Short answer: No, there is no such convention.
Finding "the right" names for such classes depends always on
the specific ...
3
votes
Naming multiple Entities of same collection (with different sets of fields, few less, few more)
I agree with @DocBrown's general answer.
Only thing I would add is that the accepted term for fields which identify a particular record is a "key". That term is well-known.
A "QuoteKey&...
2
votes
Naming multiple Entities of same collection (with different sets of fields, few less, few more)
If your language supports namespaces, then that can tidy up your naming. So you could create a Quote namespace, then the classes within it can drop the "Quote" prefix, becoming Quote::...
1
vote
Common practice where to place "is" word while naming predicate function: at the beginning or in the middle?
"is" or in some cases "has" should be the first part of the method name. For example
bool nothingThere = box.isEmpty()
bool nobodyThere = !car.hasPassengers();
Without the is I ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
naming-standards × 169naming × 96
coding-standards × 23
c# × 17
java × 10
coding-style × 10
conventions × 10
design × 9
clean-code × 9
programming-practices × 8
python × 7
functions × 7
variables × 7
rest × 6
methods × 6
object-oriented-design × 5
c++ × 4
javascript × 4
c × 4
api-design × 4
terminology × 4
sql × 4
class-design × 4
design-patterns × 3
object-oriented × 3