[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Variable number of arguments

Subject: Re: Variable number of arguments
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 27 Jan 2006 10:52:46 +1100
Re:  Variable number of arguments
On 1/27/06, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> If the arguments are singleton items then I think defining a single
> sequence-valued argument is the best approach (it would have been done that
> way for concat() except for 1.0 compatibility).
>
> Another approach which Dimitre has used in FXSL is to define 10 different
> functions taking 1 argument, 2 arguments, etc.
>
> Michael Kay
> http://www.saxonica.com/

  To be more precise, not "10 different functions", but 10 overloads
of the same function.

Here, the fact that the function name is the same in all 10 cases is
really important.

Also, this approach is rather an exception than the rule in FXSL. If I
remember well, it is used only for f:apply() and f:curry()

Different overloads are used systematically, on a massive scale, to
present "normal" F & O functions as higher order functions and as
curried functions, that is to present their partial applications on a
subset of arguments as a function.

--
Cheers,
Dimitre Novatchev
---------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.