W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2014

[Bug 21963] Implicit iteration on dynamic function calls

From: <bugzilla@jessica.w3.org>
Date: Tue, 27 May 2014 14:59:13 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-21963-523-dG5p39ONsK@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21963

--- Comment #5 from Jonathan Robie <jonathan.robie@gmail.com> ---
I agree that the main use case is selection from a sequence of maps (it also
applies to arrays). A sequence of maps can occur because:

* The result of a query on JSON is a sequence of maps
* FLWOR expressions create sequences of maps
* Maps occur in a collection
* A view of relational or object data creates sequences of maps

Consider the following example:

let $maps := ( { "a" : 1 }, { "b" : 2 }, { "c" : 3 } )
return $maps("b")

Currently, that raises an error. This does not:

let $maps := ( { "a" : 1 }, { "b" : 2 }, { "c" : 3 } )
return $maps?b

We currently have two syntaxes that mostly do the same thing, one iterates but
can never support all keys, the other supports all keys but does not iterate.
That makes the language confusing.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 27 May 2014 14:59:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:56 UTC