That is correct.
A debug iterator that makes sure streams are well-formed would be good.
The code generator could add it all over the plan if a debug flag is set.
Vinayak
Till Westmann wrote:
No objections here. Just to recap:
The data model interfaces stay as they are, we only introduce the convention
that we'll never return an XDMSequence from next().
Is that right?
It seems like we should have a way to check that this is the case (at least at runtime in some kind of debug mode).
What do think?
Till
On Jan 5, 2010, at 9:12 PM, Vinayak Borkar wrote:
Guys,
Currently there is a value called XDMSequence that can represent a complete
sequence in one Java Object. Originally this seemed like a good idea -- it
reduces the number of next calls where iterators can send values directly from
their producers (The FLWOR from the returnExpr, for eg).
However, this makes other code a lot more complicated -- Iterators that use the
value have to inspect the data and act appropriately if the object is a
sequence object. In my opinion, this outweighs the benefits it offers. So I am
planning to eliminate the sequence object as a value that can be returned in
the iterator stream (next()) call.
It will still continue to exist to be used with evaluateEagerly().
Thoughts/Objections?
Thanks,
Vinayak