Always use [closed, open) intervals. A programmer's perspective

in quicklink

I hope this short read has convinced you of the perils and pitfals of using [closed, closed] intervals. My guess is that the reason people sometimes fall for them is because they look nice and symmetric, and in fact work most of the time.

It's only in the edge cases that they start to break down. But that is exactly how you should evaluate how good a design is: by testing it against the edge cases.

Lees "Always use [closed, open) intervals. A programmer's perspective"