[xquery-talk] Fold-right

Michael Kay mike at saxonica.com
Thu Jan 12 08:27:37 PST 2017


> 
> Agreed, but that wasn't my point. You may have the opinion that it wasn't important, but I'm curious to know where anything tangible on laziness is mentioned.

It isn't - deliberately. We leave "quality of implementation" issues entirely to the implementor. There are many implementation techniques available, including ones that may not have been invented yet, and there are different trade-offs between time and memory, and the spec quite deliberately doesn't get involved in such matters. The spec tells you what result to expect, it doesn't tell you when to expect it.

Michael Kay
Saxonica


> As you say, not having any won't be very efficient, so you may as well be explicit about it, right? I don't really understand why it's preferable to have a syntax without an implementation, and I simply pointed out that in the case of the fold-right example that becomes slightly odd...




More information about the talk mailing list