[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how should Chain.iterator(n,n-1) work?
Ondrej LHOTAK <olhotak@sable.mcgill.ca> wrote:
> I agree that this is a problem. Things like chain which are used all
> over the place shouldn't just silently do weird things when passed
> illegal arguments. On the other hand, because it's used all over the
> place, I'm not very happy with the O(n) validation of the arguments.
I agree with this and that throwing an exception is probably the way
to go.
> So, here's one idea up for discussion: Let's have the chain handle the
> special case of when the end statement is one before the start
I'm not sure this is really a "special" case except that it's been
happening fairly often -- as a consequence of confusion involving the
use and meaning of Trap.getEndUnit().
Cheers,
Navin.