Skip to content
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

Math range notation for end-exclusive ranges is not inclusive #248

Closed
skade opened this issue Jan 30, 2018 · 2 comments
Closed

Math range notation for end-exclusive ranges is not inclusive #248

skade opened this issue Jan 30, 2018 · 2 comments

Comments

@skade
Copy link
Contributor

skade commented Jan 30, 2018

Got a notice on Twitter of someone figuring out that https://doc.rust-lang.org/rand/rand/trait.Rng.html#method.gen_range doesn't include high as they couldn't read [low, high). While that is standard math interval notation, not everyone using rand knows how to read it. A good way to express the end-exclusiveness without adding a lot of boilerplate everywhere could be worthwhile. Maybe a short notation glossary?

(Also, sorry for the title, I couldn't resist)

@pitdicker
Copy link
Contributor

Duplicate of #167 and #188

@dhardy
Copy link
Member

dhardy commented Jan 30, 2018

We have been trying to use words too, i.e. inclusive and exclusive. See for example Closed01. Is that sufficient?

But thanks for the notice. This is indeed a duplicate of #167.

@dhardy dhardy closed this as completed Jan 30, 2018
dhardy added a commit that referenced this issue Jan 30, 2018
pitdicker pushed a commit that referenced this issue Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants