Skip to content

Conversation

@korservick
Copy link

Correct output range from [0...numBuckets] to [0...numBuckets-1] in comments ;)

Correct output range from [0...numBuckets] to [0...numBuckets-1] in comments ;)
@dgryski
Copy link
Owner

dgryski commented Feb 12, 2018

@mark-kubacki
Copy link

mark-kubacki commented Feb 12, 2018

I too feel [a… b] (aka [a.. b]) is a more common notation in CS and Informatics academia than the math notation of an open/closed interval. Especially because one-offs are a notorious pitfall.

I for one wouldn't use [a, b) if between numbers b and b-1 were no other number. Or in other words, wouldn't use with discrete numbers at all. I understand it adds utility when dealing with something like rational numbers.

I guess using the word »range« adds to the confusion because in Go it's always inclusive.

@dgryski
Copy link
Owner

dgryski commented Feb 12, 2018

I can delete the word range, but I'd like to keep the wording similar to the standard library.

@korservick
Copy link
Author

Hmm, I forgot about [a,b) notation... sorry
So, may be stay with present comments and add "*in math notation" for people like me :) ?

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

Successfully merging this pull request may close these issues.

3 participants