Re: Reference and First-Class Function

"Vladimir Nesterovsky" <[email protected]> Tue, 16 Dec 2008 09:08:22 -0800
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <7969edae$61e6188f$18125f8a$@com>
> > 1. Don't you think that ex:call() is overloaded with meanings?
> 
>   Sorry, I don't understand exactly what you mean.

1. ex:call() dereferences a reference.
2. ex:call() performs a function call.

> > 2. ex:call($function, $arg1, $arg2, ...) assumes variable number
> > of parameters.
> 
>   Yes.  I don't like that, but I haven't find any other way.
> 
> >     An alternative is to define single call syntax: 
> >      ex:function(xs:QName('my:add'));
> >      ex:call($function, $argument);
> 
>   But what if your function takes several parameters?

In principle it's enough to support one argument function, taking into 
account that 
$argument can be a reference. That one argument function can forward a call 
to a real 
destination. In fact a pair ($function, $argument) can be thought as a 
function-object.
--
Vladimir Nesterovsky
http://www.nesterovsky-bros.com