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 has or is), but whatever we decide, let's be consistent 😅


    But when should we actually use has over is?

    This is getting into personal preference territory, but since you asked 😉

    IMO, has should 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()

    is should 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 is since it should pair nicely with isSuccess().

Edited Sep 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading