W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2016

[Bug 29590] dependency cycle and indirect references

From: <bugzilla@jessica.w3.org>
Date: Mon, 25 Apr 2016 08:24:23 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29590-523-nYmKyFMgc9@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29590

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@saxonica.com

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
We very deliberately made cyclicity a dynamic error rather than a static error
to permit this kind of construct. Yes, it's not statically decidable whether
something gets evaluated, but it is dynamically decidable. Evaluating
function-arity(F) does not involve evaluating F (it cannot involve calling F,
because no arguments have been supplied); so the dynamic evaluation of this
query involves no circularity.

By contrast, in function-lookup-613, dynamic evaluation is not possible. Given

        declare variable $v := function-lookup($n, 0)();
        declare function local:return-v() {$v + 1};

we can't evaluate $v without calling local:return-v (note the "()") and we
can't evaluate local:return-v() without evaluating $v.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 25 April 2016 08:24:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:00 UTC