Ticket #410 (new fixme)
fix naming of (static) iteration control functions
| Reported by: | ichthyo | Owned by: | |
|---|---|---|---|
| Priority: | nice | Milestone: | 1alpha |
| Component: | lumieraProc | Keywords: | QA cleanup |
| Cc: | Blocked By: | ||
| Blocking: | #349 |
Description
"hasNext()" is completely misleading. The semantics is now rather like in C#, not as in Java! actually it means this is valid. TODO: invent a better name, spot all uses, update the documentation
Note: See
TracTickets for help on using
tickets.

To clarify this ticket: the concern is the iteration control API as defined by IterAdapter. The "Lumiera Forward Iterator" concept as such is fine and shall remain as it is now. There are several classes providing a Lumiera Forward Iterator implementation directly, not just through IterAdapter. But still, IterAdapter is a core class and this extension mechanism is used at several locations. The point is: the semantics shifted slightly while these concepts were being shaped. Now (and I consider that the final version) the "hasNext()" function does not mean to peak if we could get a next element, rather, it means to check if the current state points to a valid element. Moreover, I defined the "pos" parameter as by-reference, allowing for side-effect changes. In the light of the now settled usage pattern, I'd rather prefer to make that a const& -- likewise the iterNext(source_,pos_) should rather return a modified position.
So the task for this ticket is to come up with better names, change the API and verify these changes are possible without breaking any existing code.