Hacker News new | ask | show | jobs
by sandpaper26 1003 days ago
Interesting note about using "to" for ranges. I see things like "between 15-20" or "from 15-20" all the time at work, and it's never clear whether 20 is included in that range.

Is "from 15 to 20" more clear, without context on any of these? Or is it always context dependent? How about "between 15 and 20"?

4 comments

For some reason "between 15 and 20" sounds like it could include 16 and 19 but not 15 and 20.
I think we can presume the reason that between usually refers the space between things, less the things. “The ATM is in the lobby between the elevators and the restaurant” probably mean the ATM in the restaurant.
Actually that sounds like the ATM in the lobby.
The ATM is in the lobby between the elevators and the restaurant” probably mean the ATM in the restaurant.

This starts with "The ATM is in the lobby", so there's no reason to think it's in the restaurant. The "between the elevators and the restaurant" gives you a clue that if you go to the lobby and see either the elevators or the restaurant, but not both, keep going until you see the other one and once you do see the other one, you've passed where the ATM is.

This is kind of a bad example for if between means a closed or open interval, however, since neither the elevators nor the restaurant are non-occupying boundaries, but rather places that could be occupied by an ATM. However, if the ATM is found at the elevators or in the restaurant, you wouldn't describe the location of the ATM relative to both of these, you'd describe the location as at/inside one of them. You might say, though, that the ATM is at the elevators, (with the elevators being) {near,after,before} the restaurant, to explain where the elevators are.

I have tutored students who struggled severely with numbers; the most success in this task I've had with "pick a number from the list 11, 12, ..., 23".
To me "from 15-20" implies you are starting at a number between 15 and 20. Not that the entire range is 15 to 20. And yes there is also the problem of inclusive or exclusive.
Interesting. To me, "a number from A to B" is inclusive because "from" implies belonging, making the bounds at least [A,B). The "to", to me, implies the bounds on A apply to the bounds on B. So that would make it inclusive on both edges.
You can use [15-20] inclusive and below20 above 15 for excluding? People just hate adding "inclusive" and then complain about ambiguity when its misinterpreted