3 ms·
> Between what happens when the start index is greater than the length of the input, and what happens when the end index is greater than the length of the input
by randomdata 2y ago
> Between what happens when the start index is greater than the length of the input, and what happens when the end index is greater than the length of the input.
Again, what makes that an inconsistency and not just a different language?
> My suggestion is that the behavior would have made more sense
On the basis of the start and end indices being equivalent. But are they? What attributes of the language should see us consider them to be?
- deleted 2y ago[deleted]
- LegionMammal978 2y agoIf you see no reason to think that the two indices ought to have been equivalent, then there is no inconsistency that you might care about. > What attributes of the language should see us consider them to be? None.
- randomdata 2y agoMaybe they are equivalent, but looking at what other languages do is irrelevant in determining that. If there is nothing else in Ruby to suggest that they are equivalent, then perhaps they are not? I'm not sure where "care" enters into the picture. It's a computer language. For what reason would emotions be assigned to it?