Ticket #182 (closed todo: done)
Concept "lumiera forward iterator"
| Reported by: | ichthyo | Owned by: | ichthyo |
|---|---|---|---|
| Priority: | lesser | Milestone: | 0integration |
| Component: | lumiera | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | #190, #283, #319, #343, #347, #349, #353, #375, #392, #393, #482, #490 |
Description
Especially in Proc-Layer we utilise already several iterator implementations. Factor out a concept from these and asure they comply. Integrate with util::for_each and util::isnil. Unit test coverage and documentation in the lumiera DesignProcess
Explanation: the STL defines various and very elaborate iterator concepts. Ichthyo considers most of these an overkill and an outdated aproach. Many modern programming languages build on a very simple iterator concept, which allows once to pull a sequence of values -- and nothing more. Exposing only such an iterator often makes for very clean APIs.
Thus the idea is to formulate a concept in compliance with STL's forward iterator -- but augmented by an stop-iteration test. Of course, there should be some simple support templates to help building compliant iterators. This would give us basic STL integration and look familiar to C++ and Java programmers without compromising the clean APIs.
Change History
comment:2 Changed 3 years ago by ichthyo
- Priority changed from normal to lesser
I've now implemented 3 basic templates, which should be enough for now to define the Session interface.
TODO: retrofit the existing iterators, more unit test coverage with real-world use cases, document the iterator concept
comment:7 Changed 2 years ago by ichthyo
...so, what remains here to do?
- write a Design-Process entry to document the concept.
- have a look at existing iterators, which could be retrofitted easily
- create tickets for the remaining iterators, to be cleaned up later
The summary of the concept, as it's implemented now, can be found in the doxygen of lib/iter-adapter.hpp
comment:15 Changed 2 years ago by ichthyo
- Status changed from accepted to closed
- Resolution set to done
- Blocking 343, 347, 349, 353, 375, 392, 393 removed
Successfully used now within QueryResolver. Cleaned up the back-link in IterAdapter. Wrote a documentation Page to the TiddlyWiki and also used the same text as DesignProcess-Entry

doing some initial steps here, because I need to write yet more iterators...
probably this will stay unfinished for some time to come, because I've more urgent other work...