Re: Re: Syntactic improvement to array

From: Date: Mon, 05 Feb 2007 12:17:08 +0000
Subject: Re: Re: Syntactic improvement to array
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-27804@lists.php.net to get a copy of this message
On 05/02/07, LAUPRETRE François (P) <francois.laupretre@ratp.fr> wrote:
From: Christian Schneider [mailto:cschneid@cschneid.com]
- func('foo' => $foo, 'bar' => $bar, ...) equivalent to func(array('foo' => $foo, 'bar' => $bar, ...)
Argh! Reading such a line, I think of named parameters, not an array. Ugly, confusing. -1 for me. Definitely.
I agree with Francois here. Other than looking STRONLY like named parameters, surely there is a flaw if a declaration is ... function convert(array $from, array $to) If the calling code is ... convert('foo' => $foo, 'bar' => $bar, ...) where is the boundaries for the 2 arrays? There would need to be SOMETHING. convert('foo' -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"

« previous php.internals (#27804) next »