W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2015

[Bug 29346] [XP31] XPath-style currying, or the arrow operator, may require a bit more specification

From: <bugzilla@jessica.w3.org>
Date: Fri, 18 Dec 2015 11:14:07 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29346-523-Si6TqL3I5v@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29346

--- Comment #4 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
(In reply to Michael Kay from comment #3)
> With this interpretation, I would be inclined to rewrite the spec as follows:
> 
> An ArrowExpr is alternative syntax for a *static function call* or *dynamic
> function call*. 
> <snip />
Thanks for this. This seems to address all my concerns, it is a solid rewrite
and, more importantly, it removes the possible misinterpretations and/or
under-specification of the text.

> For example, a type error occurs if the result of evaluating the VarRef or 
> ParenthesizedExpr is not a function, or if it is a function with incorrect 
> arity. 
I agree that for *dyn function calls* this is indeed a type error, but if it is
static, it is a syntax error (at least I see nothing special under 3.1.5.1 on
static function calls), i.e., we raise XPST0017 statically, or XPTY0004
dynamically.

What is your take on aligning this more closely with the static function call
syntax, i.e. my point (6) in comment#0? That is, allowing a => concat#3('b',
'c')? It requires adding NamedFunctionRef with otherwise the same semantics as
you describe for EQName.

Conversely, if we don't want to add this, I don't see how a => (concat#3)('b',
'c') is a dynamic function call, I believe it is also static. In which case we
should either expand the text, or expand the grammar, whichever is more
convenient.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 18 December 2015 11:14:09 UTC

This archive was generated by hypermail 2.3.1 : Friday, 18 December 2015 11:14:09 UTC