Re: [PHP-DEV] Re: named function arguments

2003-10-24 Thread Michael Walter
Sebastian Bergmann wrote: Named parameters are commonly implemented using an associated array in PHP: foo( array( 'foo' => 'bar', 'bar' => 'foo' ) ); ?> So, how do you think that isn't known to the original poster as he even explicitely states that

Re: [PHP-DEV] Re: named function arguments

2003-10-24 Thread netcat
Hartmut Holzgraefe wrote: Sebastian Bergmann wrote: netcat wrote: Named parameters - i think is very good idea. Named parameters are commonly implemented using an associated array in PHP: which is a nightmare performancewise and suboptimal as far as syntax is concerned as the additional 'a

Re: [PHP-DEV] Re: named function arguments

2003-10-24 Thread Hartmut Holzgraefe
Sebastian Bergmann wrote: netcat wrote: Named parameters - i think is very good idea. Named parameters are commonly implemented using an associated array in PHP: which is a nightmare performancewise and suboptimal as far as syntax is concerned as the additional 'array(' keyword needed serves

Re: [PHP-DEV] Re: named function arguments

2003-10-23 Thread Sebastian Bergmann
netcat wrote: > Named parameters - i think is very good idea. Named parameters are commonly implemented using an associated array in PHP: 'bar', 'bar' => 'foo' ) ); ?> -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/

[PHP-DEV] Re: named function arguments

2003-10-23 Thread Christian Schneider
netcat wrote: Named parameters - i think is very good idea. I know i would use them. I'm really not sure about the correct syntax for it though. Important for our application would be that it works with varargs, as we have a lot of (potential) parameters of which you normally only give a small su

[PHP-DEV] Re: named function arguments (was: Proposal: Dangling comma in function call parameters)

2003-10-23 Thread netcat
Christian Schneider wrote: [snip] I was also thinking of proposing named parameters, i.e. basically removing the need for array() in foo(array('style' => 'hot', 'size' => 42)); but I guess that'll be even more controversial :-) Named parameters - i think is very good idea. I know i would use t