- From: Michael Kay <mhk@mhk.me.uk>
- Date: Wed, 23 Jun 2004 14:03:07 +0100
- To: "'Per Bothner'" <per@bothner.com>, "'Liam Quin'" <liam@w3.org>
- Cc: <public-qt-comments@w3.org>
> > Permitted, or required? > > Consider something as simple as: > > declare variable $x { $y }; > declare variable $y { 10 }; > $x + $y > > Is this portable, implementation-defined, or neither? > What about more complex expressions that depend on > lazy evaluation? This example doesn't depend on lazy evaluation. It places some demands on the order of evaluation, but that's not the same thing. Lazy evaluation is just one strategy for handling this. In some functional programming language there is a requirement that lazy evaluation is used to prevent infinite sequences arising when evaluating certain expressions. XQuery/XPath imposes no such requirements, it's left to the implementation, which means that some implementations will fail (run out of memory or time) with such constructs, when others succeed. Michael Kay
Received on Wednesday, 23 June 2004 09:05:28 UTC