Skip to content

Replace 'positive integer' with 'nonnegative integer' #6583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blkerby
Copy link

@blkerby blkerby commented Jun 21, 2025

This PR replaces all instances of "positive integer" with "nonnegative integer" in the configuration docs, as in every case zero is also an accepted value, and in many cases zero is already singled out in the docs as a possibility.

A "max_width" of zero of course does not give reasonable results (and it results in "left behind trailing whitespace" errors), but a value of 1 is just as bad, so there seems to be no harm in replacing "positive integer" with "nonnegative integer" even in this case.

Fixes #6570.

Copy link
Contributor

@ytmimi ytmimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I'd like to replace positive integer with whole number to better reflect that zero is a valid option. Feel free to suggest changes to the wording, but I'd like to avoid using the term nonnegative.

- **Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
- **Possible values**: any nonnegative integer that is less than or equal to the value specified for [`max_width`](#max_width)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonnegative is technically correct, but there's something about the double negative that I don't like. The set of Whole numbers also includes zero and positive integer values. How about this?

- **Possible values**: Any whole number in the range [0, [`max_width`](#max_width)]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A drawback is that the term whole number has three different common definitions, making it less clear; e.g., see https://mathworld.wolfram.com/WholeNumber.html. The double negative in "nonnegative integer" is annoying but I don't know of any other unambiguous alternative. From what I've seen, "nonnegative integer" is the more-or-less standard terminology in math and computer science, with exceptions like in elementary school where "whole number" is used (as the concept of negative numbers isn't yet introduced), or in type theory or fundamentals of mathematics where "natural number" is commonly used (e.g. coming logically before constructing the set of integers), though that term is also ambiguous since some authors exclude zero from "natural numbers".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: "0" listed as possible value for "positive integer" values
3 participants