A small comment: I don't think named parameters should seriously affect
performance if we check for their presence during the call. That is to
say, if a call has no named parameters, use what we use now. Otherwise,
push an extra hash variable on to the end of the stack. Creating this
hash variable should be no more overhead than if the user manually
passed in an array() as the last parameter.
Johannes: yeah I think I strongly prefer $parameter => 23. Like you
said, it looks like a constant if we used f(parameter=>23) . In fact,
arrays with arbitrary keys are useful and PHP already has
$arr['foo-bar'], ${'foo-bar'} and $baz->{'foo-bar'}, so f('parameter' =>
23) is not such a stretch. Especially since func_get_args returns an
array. There is only one case where things get a little hairy, and
that's f(2, '0' => 4) which will probably make func_get_args() return
array(4) ... just as array(2, '0' => 4) would return array(4).
Greg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php