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


--- 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 on
static function calls), i.e., we raise XPST0017 statically, or XPTY0004

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

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 18 December 2015 11:14:09 UTC