IDE Issue 9
From MemberWiki
IDE Issue 9: Complex parameter lists (e.g., varargs)
Introduction
During the IDE phone call on 06Dec2007 (http://www.openajax.org/member/wiki/IDE_Minutes_2007-12-06), there was discussion about complex parameter lists, which presumably might include something like the varargs feature found in some programming languages, but would also take into account other scenarios (e.g., the first argument determines the nature of the subsequent arguments).
JavaScript is a highly flexible language, where a function can examine its argument list via the arguments variable that is available inside of a function. Therefore, complex parameter lists are very much a possibility.
However, most of the time APIs are designed to be simple and follow the pattern where there are N discrete parameters, where each parameter is a particular type of object. Sometimes the final parameters are optional. Complex parameter lists are very much in the minority for public APIs.
Jon's proposed resolution
How about adding a complex="true|false" attribute to the <parameters...> element, with false as the default? If false (the default), then the parameter list is simple and can be expressed using a list of <parameter> elements that are the children of the <parameters> element. If true, then the parameter list is optional and if provided it represents one possible set of parameters. In order to determine the full range of possible parameter lists, the developer should look at other documentation.
