Add naming things guide to development docs
Description
Rather than a strict "Thou shalt name things this way" document, a guide to naming difficult things would be a helpful addition to our developer docs.
Context
The following discussion from !18934 (merged) should be addressed:
-
@pslaughter started a discussion: (+3 comments) nitpick: I see we've already had a bit of discussion already with the naming of things (whether to use
hasoris), but whatever we decide, let's be consistent😅
But when should we actually use
hasoveris?This is getting into personal preference territory, but since you asked
😉 IMO,
hasshould be used when describing whether or not something is true about a thing that I possess (out of many other things). Example:Warehouse.hasEmptyShelf()TestExecution.hasErrors()
isshould be used when describing whether or not something is true about me. Example:Warehouse.isEmpty()TestExecution.isFailed()
Notice that the last example isn't good English, but since it describes the subject itself (and not about something I possess), I prefer to use
issince it should pair nicely withisSuccess().