Michael Kay
Michael Kay
>This is exactly what I was stating: How can the processor know "the last item" of a huge or infinite list? The same way as it knows the first item:...
Although details of the Saxon implementation are not really pertinent to the spec, for the benefit of anyone who wants to get the best performance out of Saxon, I would...
Generators do seem to be a potentially very powerful tool, though probably only one for expert users. I can see this being made available as a function `fn:generate-sequence($len as xs:nonNegativeInteger,...
>significantly worse 275 seconds is worse than 260, but not significantly worse. The reason that we choose lazy evaluation by default is that if it's the wrong choice, the overhead...
>What is proposed in the quote returns a complete sequence It returns a value that behaves exaclty like a sequence but one where each item in the sequence only needs...
Thanks, that looks like a very coherent proposal, and it's easy to understand as a generalisation of the design pattern used by fn:random-number-generator. Looking at it again, though, I wonder...
Note also issue #295, which points out the need for extensions to the record-type syntax to allow record types of the kind you are using, with self-reference in function arguments...
I guess two more useful functions on generators might be `for-each()` and `filter()` that return new generators. It would seem appealing to make the functions `skip()`, `take()`, `for-each()`, `filter()` etc...
>Can we extend... Not if the argument type is sequence, because there is no type that i more general than sequence, so the union of sequence with any other type...
One way forward might be to use annotations as a sort of interface/prototype mechanism. We could say, for example, that if $X is annotated `%prototype=map{"count" : array:size#1, "head" : array:head#1,...