> 
>> i still think that the "real" solution requires "completing" the
>> interval types.
> I think thats a separate issue - you still end up with the same
> problem, just multiplied.
> 

        it's only partly a separate issue. one of the sources of the problem 
here is that half-open empty intervals don't makes sense. the question 
"does the instant 9:00 belong to [9:00, 9:00)" has conflicting answers 
(by definition). empty intervals that are either open or closed actually 
do make sense. so "does the instant 9:00 belong to [9:00, 9:00]" has a 
clear answer: "yes". "does the instant 9:00 belong to (9:00, 9:00)" also 
has a clear answer: "no".

        so if you allow empty intervals to be open or closed they won't cause 
paradoxes. but currently joda has no notion of open or closed intervals. 
there is only one kind of interval which is, implicitly, half-open on 
the right.

        i grant you that introducing the other kinds of intervals appears to 
unnecessarily complicate the situation, but you don't really have a 
complete "interval calculus" unless you introduce them.

        btw, i already have use cases in my code where i need a closed interval 
[a, b]. i've been handling them by creating the interval [a, b + 
epsilon) where epsilon is very small. this is obviously a hack, although 
it works. so there's an argument to be made that they're necessary.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to