Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

*half-open intervals. There have been times I needed an (open, closed] interval. But there have also been times when I wanted a fully closed interval because I was setting an arbitrary limit and it's easier to tell a user "100 is the maximum" versus "it must be below 100”, so what value should be put to max out out, 99? 99.99? etc

To add some nuance I'd say that if you're dividing a larger interval into smaller subintervals then a half-open one is probably what you want.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: