2 ms·
This tripped me up a few times in Swift in the beginning, when I did a range `lowerBound ..< higherBound`, or `lowerBound ... higherBound`, and assuming that in
by auggierose 6y ago
This tripped me up a few times in Swift in the beginning, when I did a range `lowerBound ..< higherBound`, or `lowerBound ... higherBound`, and assuming that in those cases where actually `lowerBound > higherBound`, which can often happen naturally, it would default to the empty range. Still think empty range would be the sensible thing here, but at least Swift throws an exception, so after an initial wtf it wasn't a problem.