Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Predicate

A function or value that answers a yes/no question about something.

Say it to an AI

TypeScript predicate canInviteMembers(member, isGuestInvite): boolean for our workspace invites. Name every boolean with an is/has/can prefix (isActive, isEmailVerified, hasPaidSeat, isAdmin) so each condition reads as a question, and use guard clauses for the inactive and unverified cases.

How an expert would brief the stronger version of “Team invite check”.

See it

Try it as a puzzle →

A pull request adding the rule for who can invite people into a team workspace in a SaaS project tool.

Study A · the weaker one
Study B · the stronger one

Why: B names the function canInviteMembers, so 'if (canInviteMembers(member, false))' reads as a question. A's checkInvite sounds like it might throw an error or return a report.

Related words

  • Intention-revealing name
  • Magic number
  • Single responsibility principle
  • Boolean
  • is/has/can prefix
  • Flag argument
  • Abbreviation
  • Verb-noun naming

Room 2 · Naming

Learn “Predicate” in a five-minute lesson

Start free
AI can build almost anything. The bottleneck is saying what you want.
WordsPricingTermsPrivacyRefundsContact
© 2026 Briefle