If so, that seems backwards, and too late to fix :-(
(not huge, but unfortunate)
If so, that seems backwards, and too late to fix :-(
(not huge, but unfortunate)
* the Swift operators makes a surprising amount of sense (where Ruby's make very little): the longer operator yields the longer range and `0..10` yields a range of length 10. Think of it like this: the "center": dot is the range itself, the left dot includes the left bound, and the right dot includes the right bount. Thus `..` is "range with left bound included` and `...` is "range with right bound included"
Ruby (and coffeescript, and perhaps perl) uses a..b to indicate a closed range (i.e. including b), or a...b to indicate a half-closed range (not including b). Swift seems to do the opposite. My guess for how ruby (or predecessors) came up with this was by copying bash (or sh?), which has only the .. version.
To be honest, the .. vs. ... distinction is really confusing and error-prone, and a bad bit of syntax to include in any language, period.