Re: "If F is a partially applied function ..."

On 16-02-09 04:45 PM, Robie, Jonathan wrote:
> I think we have to say that invoking a partially applied function results
> in the underlying function being called,

Except that there *isn't* an "underlying function". Look at item 5.a, where
PAFs are created. It doesn't say that the implementation of the new function
is (a reference to) F, it says that it's the implementation of F. So if F's
implementation is a FunctionBody, then the new function's implementation is
the same FunctionBody. If F's implementation is some imp-dep black box, then
the new function's implementation is the same black box.

Conceivably, we could specify a PAF the way you're thinking, but we don't.

> In the CR (https://www.w3.org/TR/2015/CR-xquery-31-20151217/), this
> section tells us how a partially applied function is created, but it
> never tells us what happens if you try to invoke one.

Yes it does! If the PAF's implementation is a FunctionBody, then 5.b.ii ("If
F's implementation is a FunctionBody...") tells you what happens when you
invoke it. If the PAF's implementation is imp-dep, then 5.b.i ("If F's
implementation is implementation-dependent...") tells you what happens.

-Michael

Received on Wednesday, 10 February 2016 02:02:58 UTC