> If it is necessary to add arguments, they should always be added to
> the *end* of the argument list, and the internal handling should check
> for "undefined" values so that existing code that does not pass those
> arguments won't break.
I would really really really like to see the core methods adjusted,
either stepwise or en masse such that:
* The old method names and signatures remain in place, unchanged
externally but wrap
* New methods that accept dictionaries of named parameters.
For example something like:
function
doHttp(type,url,data,contentType,username,password,callback,params,headers,allowCache)
{
// either
var method=type
return twDoHttp(method, url, callback, {data: data, type:
contentType, <etc>});
// or
return twDoHttp({method: type, url: url, data:, data,
contentType:contentType <etc>})
}
The first version has some ordered parameters for things which are
required for the method to function.
I believe this preserves backwards compatibility for existing plugins
while allowing new plugins to alter, without pain, the signature of
core methods.
Is this crazy?