On Sun, 13 Mar 2005 10:14:49 -0500, Evan Prodromou evan@bad.dynu.ca wrote:
I also don't think that named-arg passing makes defining the event parameters any simpler; you just have to look up the names of the parameters rather than their position. Either way, there's a documentation requirement that won't go away.
This is just a comment, in that you've done the hard work of coding the thing, so far be it from me to criticise from such limited experience, but I think there are advantages to named arguments:
* it makes *altering* the event parameters in the future easier to cope with - if you have named parameters they can always remain as meaning the same thing; if an extra one is added, it gets an extra name; if one is lost, functions which didn't use it anyway will still work. With un-named params, you might be able to get away with adding an extra one on the end, but you certainly couldn't safely remove one, and adding one in the middle because it was a more logical ordering would also be a no-no.
* if a function only needs to refer to one of the params, it's kind of annoying to define it as something like myFunction($ignore1, $ignore2, $ignore3, [etc,] $the_arg_we_want). Kind of a minor point, but definitely more convenient with named args, where you'd just never mention the others, even though they'd been passed.
* Similarly, people might mistakenly think that the name of the arguments is important, or even find themselves with garbled results because they thought the name of the arguments was *sufficient*. But I guess people *that* new to programming are going to have multiple problems anyway, and will need someone to call on for advice who'd see through that.