in reply to DateTime::Span intersection inconsistencies
I'm still not clear on why the end of the set defaults to being open
If you want to break up an arbitrary domain into mutually exclusive, collectively exhaustive ranges, then half-open intervals are often easier to deal with (and reason about) than closed intervals. Consider real numbers, or floating point approximations thereto.
Update: Or, for that matter, time intervals. The DateTime interface implies you can specify nanosecond precision, but it doesn't preclude greater precision. If you restrict intervals to be closed, you cannot deal with times that fall between the end of one interval, and the start of the "next". With half-open intervals, there need not be a notion of "next", just a notion of "this is an acceptable place to start and/or end an interval".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DateTime::Span intersection inconsistencies
by ikegami (Patriarch) on Jul 02, 2011 at 02:43 UTC | |
by jpl (Monk) on Jul 02, 2011 at 15:22 UTC | |
by ikegami (Patriarch) on Jul 02, 2011 at 17:11 UTC |