News for hackers. Stuff that matters.
Re:Indices Point Between Elements by orclev on Monday August 24, 2015 @03:48PM (#10112525)
He undermines his own argument right out of the gate. When he shows the part about which number should be used for the last element in the range there's still two valid choices, you could choose to stop at 3 with the understanding that the element to the right of that is the last element to be selected, or to stop at 4 with the understanding that in this context your indexing is "special" and you're actually selecting the element to the left of the index.
Re:Indices Point Between Elements by morpher on Monday August 24, 2015 @04:23PM (#10112726)
If you treat the indices as between elements and include all elements that are between the start and end elements, there is only one reasonable choice. It would be more "special" to include elements that are outside of the specified range (i.e., the element to the right of the final index).
Re:Indices Point Between Elements by crusso on Monday August 24, 2015 @05:20PM (#10112992)
Yeah, but I think that orclev was saying that you have a rule at the beginning that the element to the right of the index is important and then in ranges, the element to the right of the index is know longer important.

One way or the other, someone needs to know the same number of rules in order to understand how the indices work.