On Tuesday, 3 June 2014 at 13:18:38 UTC, Byron Heads wrote:
"Use .. to make a range that omits its upper value, and use ...
to make a range that includes both values."
That is going to be a source of a lot of bugs, so easy to type
3 when you ment 2
Agreed. But I think if the language made it differentiate better,
having exclusive and inclusive versions could work...
inclusive: 0...8
exclusive: 0..<9
Personally, when I'm writing out pseudocode I almost always use
"..<" because it's obvious and no one has ever wondered "What do
you mean by that?" I've heard a few times from people that wanted
to clarify whether I meant inclusive or exclusive by "0..9"