-
Notifications
You must be signed in to change notification settings - Fork 771
Counted ranges abuse mathematical notation #2932
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
Comments
FWIW, +1 from me as the originator of this particular abuse of interval notation. It was originally less offensive since we used it in contexts where it was plain that the second member of the tuple is not a sentinel a la |
I agree that we should not overload existing, established notation for counted ranges. I don't have an "obvious" solution, but maybe we can define a slightly more elaborate device, maybe like “ |
Editorial meeting: Define range of iterators. "Elements in the range" means dereferencing the iterators in the range. Use " |
Counted ranges are presented as
[
A
,N
)but don't have the normal mathematical meaning; instead, they mean [
A
,A
+N
) (where the "+" means "the value that would be obtained byN
applications of ++ toA
" rather thanoperator+
).We should not abuse established mathematical notation in this way, and should find a different and unambiguous way to present counted ranges.
The text was updated successfully, but these errors were encountered: