logo       

Re: FunctionSignature, rev 2: msg#00208

text.xml.exist

Subject: Re: FunctionSignature, rev 2

I have been thinking a bit more about the changes you proposed. They point
into the right direction:

Currently, FunctionSignature.isOverloaded() indicates if a function may accept
more arguments than those specified in the function signature. A typical
example is fn:sum().

However, there are also several functions that accept only one, optional
argument. In this case, the optional argument should be made explicit.

I thus propose that we

1) add another flag to SequenceType: isOptional. A predefined optional
argument is then just specified in the argument list like a required
argument.

2) rename isOverloaded to unlimitedArgs to indicate that a function may accept
any number of arguments

You can then implement the two methods isUnlimitedArguments() and
isArgumentCountAllowed() based upon this information.

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise