cplusplus / cplusplus/draft

Replace "smaller" with "lower" and "larger" with "greater"? LWG4167

Open
#6,747 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lwg P3-Other
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

I've noticed that [algorithms] contains numerous uses of "smaller" and "larger" instead of "lesser" and "greater", or "smallest" and "largest" instead of "least" and "greatest". For example:

Returns: The larger value. Returns the first argument when the arguments are equivalent.
- [alg.min.max] p10

This is surprising and doesn't follow mathematical convention, where you typically speak of "greatest common divisor", "least common multiple", or "lower of two values", not in terms of "smaller" and "larger", which are reminiscent of physical size comparisons. This language is also inconsistent with:

  • std::gcd (can't mean largest common multiple)
  • < (the less-than operator and Unicode LESS-THAN SIGN)
  • > (the greater-than operator and Unicode GREATER-THAN SIGN)
  • std::xxx_ordering::greater and std::xxx_ordering::less
    -std::less and std::greater

With 186 uses, "greater" is much more common in the standard than "larger", at 25. I think we should use consistent language. The standard library symbol names are pretty consistent in using less/great-terminology, but the prose is frequently breaking this convention.

Suggested Fix

Since the words are synonyms and there is no possible ambiguity caused or resolved, we can simply search/replace these terms:

-The larger value.
+The greater value.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with a repository-wide search for “smaller”, “larger”, “smallest”, and “largest”, paying particular attention to the [[algorithms]] clauses and the p10 example linked in the issue. Review each occurrence for terminology and update the prose consistently; done means the intended replacements are applied without changing meaning.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.