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

The post I am replying to made no assumptions about the domain the order is defined on. If it is over the reals, sure, you can use -∞ and ∞. If it is over the integers, you can use MIN_VALUE and MAX_VALUE, sacrificing some of your domain (which might be a problem, depending on the context), or you can use Option[Int], which comes with performance issues.

Or, you can use a range which is a sum of three/four cases, and not worry about any of that.



> What are these special open-ended items?

> If it is over the reals, sure, you can use -∞ and ∞. If it is over the integers, you can use MIN_VALUE and MAX_VALUE

If you already knew the answer, why did you ask?




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

Search: