On Wednesday, 26 March 2014 at 15:37:38 UTC, Steven Schveighoffer wrote:
Yes, but when you know that empty is going to return false, there isn't any logical reason to call it. It is an awkward requirement.

-Steve

Not only that, but it's also a performance criteria: If you are iterating on two ranges at once (think "copy"), then you *know* "range2" is longer than "range1", even if you don't know its length.

Why pay for "range2.empty", when you know it'll always be false? There is a noticeable performance difference if you *don't* check.

Reply via email to