On 06.04.2010, at 12:16, Richard Quadling wrote:

> Hello.
> 
> A suggestion I would like to make is to allow for nothing to be
> supplied for defaulted parameters.
> 
> I suppose the easiest way of describing this issue is with the
> following code ...
> 
> <?php
> function foo($bar, $baz = 9, $buzz = 10) {
> return "$bar $baz $buzz";
> }
> 
> // Whatever is supplied for $baz will be used for $baz.
> // User has to know the default value of $baz rather than just
> allowing the default value.
> echo foo(1, 9, 20);
> 
> I don't know the stylics on using default parameters, but for the user
> to have to know the default value would sort of make the default
> redundant.
> 
> 
> // Passing nothing at all could be one option.
> echo foo(1, , 20);


i dont think is really a nice syntax to support. either we add named parameters 
are you just use the current work around for the absence of named parameters 
(aka an array parameter and array_merge/array_replace_recursive)

regards,
Lukas Kahwe Smith
m...@pooteeweet.org




--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to