There are convincing cases one can make in favour of half-open intervals (at least in certain circumstances), but this isn’t it.
This is just a rambling, absolutist mess.
This is just a rambling, absolutist mess.
- what are you going to do when you need to split [a,b] into multiple parts, for performance reasons? [a,c], (c,b] ? Can your codebase handle different interval types? Having [a,b) everywhere is simpler
- stuff like 23:59:59.999999999 is code smell, well until database rounds it up, to next day, then it turns into bug
In other words, I think the blog post lists problems the author has had and in those cases an open-closed interval would have worked better. But one could come up with an opposite case, would that be equally true?