in reply to API design - if you're expecting a scalar and an array ....

If the list is specifically XML attributes to put in the element, rather than general named parameters to the function, I agree with points 2 and 4.

I don't know about the style of using the fat arrow though. Is that whole thing supposed to be a logical "pair"? Or just two top-level parameters? If you add a 3rd, the use of => won't be sensible anymore, so you are ignoring point 4.

—John

  • Comment on Re: API design - if you're expecting a scalar and an array ....