- From: Biró D. Botond <botond23@gmail.com>
- Date: Fri, 5 Dec 2014 20:25:02 +0100
- To: Michael Kay <mike@saxonica.com>
- Cc: public-qt-comments <public-qt-comments@w3.org>
Thank you for the quick clarification and looking forward for the outcome of the review on the arrow operator precedence. Best regards, Botond Biró On Fri, Dec 5, 2014 at 8:04 PM, Michael Kay <mike@saxonica.com> wrote: >> >> What is the expected behavior if the arrow postfix operator is applied to a sequence containing more than one item? >> >> Does the semantic equivalence "$seq=>$f(…) is the same as $f( $seq, … )" also hold when count($seq) != 1? >> ex, ( 1, 2, 3 ) => avg() or ()=>count() >> >> In the last call working draft the wording for arrow postfix definition implies that a [single] item is expected, but don’t see why or if this restriction would be necessary. > > You're right, I think it's a bug. It should be any sequence. > >> >> “[Definition: An arrow operator is a postfix operator that applies a function to an item, using the item as the first argument to the function.] If $i is an item and f() is a function, then $i=>f() is equivalent to f($i), and $i=>f($j) is equivalent to f($i, $j).” >> >> If the single restriction doesn't apply, then I suggest modifying the definition to reflect this. >> >> And a question related to operator precedence: currently it is not possible to use a node selection on the lhs of an arrow operator without wrapping it with extra parenthesis: >> $DAYS//@From => max() - syntax error >> ($DAYS//@From) => max() - ok > > We can certainly review it. > > Michael Kay > Saxonica >
Received on Friday, 5 December 2014 19:27:33 UTC