Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27863 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79031 invoked by uid 1010); 6 Feb 2007 17:27:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 79016 invoked from network); 6 Feb 2007 17:27:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2007 17:27:52 -0000 Authentication-Results: pb1.pair.com header.from=andrei@gravitonic.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andrei@gravitonic.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain gravitonic.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from [204.11.219.139] ([204.11.219.139:33227] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/08-18465-79AB8C54 for ; Tue, 06 Feb 2007 12:27:51 -0500 Received: from [192.168.11.2] (c-24-6-96-18.hsd1.ca.comcast.net [24.6.96.18]) (authenticated bits=0) by lerdorf.com (8.13.8/8.13.8/Debian-3) with ESMTP id l16HRm60020566; Tue, 6 Feb 2007 09:27:48 -0800 In-Reply-To: <47921.216.230.84.67.1170718864.squirrel@www.l-i-e.com> References: <011701c7482d$a39f6910$6500a8c0@zend.2k> <45C5EC63.7030605@cschneid.com> <1902.67.184.122.32.1170651145.squirrel@www.l-i-e.com> <3e74be4952d0cb2f771d095053225624@gravitonic.com> <47921.216.230.84.67.1170718864.squirrel@www.l-i-e.com> Mime-Version: 1.0 (Apple Message framework v752.2) X-Priority: 3 (Normal) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Cc: internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Tue, 6 Feb 2007 09:27:45 -0800 To: ceo@l-i-e.com X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: ClamAV 0.90rc3/2527/Tue Feb 6 02:14:46 2007 on colo X-Virus-Status: Clean Subject: Re: [PHP-DEV] Re: Syntactic improvement to array From: andrei@gravitonic.com (Andrei Zmievski) That's because you wouldn't be using those words with a newbie, if you are smart. You'd simply say "it works like list() here" and "it works like array()" here. -Andrei On Feb 5, 2007, at 3:41 PM, Richard Lynch wrote: > On Mon, February 5, 2007 12:06 pm, Andrei Zmievski wrote: >> On Feb 4, 2007, at 8:52 PM, Richard Lynch wrote: >> >>> Ewwwwwwww! >>> >>> So now we have an invisible operator with a magical symbol '[' which >>> *sometimes* means create an array, but *sometimes* means to >>> de-construct an array into individual variables? >>> >>> That's just disgusting, imho. >>> >>> -1 !!! >> >> The way I view [] is that it creates an array "context". When the >> context is an RHS, it instantiates an array. When it's an LHS, the >> context deconstructs the array. > > I can 'splain list() to a newbie and get them to understand it as an > array deconstructor function thingie, and usually succeed in one or > two tries to get it into their heads. > > I don't think I can do that with [] and LHS and RHS in anything like 2 > tries... More like 10 times, probably. > > -- > Some people have a "gift" link here. > Know what I want? > I want you to buy a CD from some starving artist. > http://cdbaby.com/browse/from/lynch > Yeah, I get a buck. So?