Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34638 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91750 invoked by uid 1010); 10 Jan 2008 13:36:43 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91735 invoked from network); 10 Jan 2008 13:36:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2008 13:36:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=saulovallory@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=saulovallory@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.245 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: saulovallory@gmail.com X-Host-Fingerprint: 209.85.132.245 an-out-0708.google.com Received: from [209.85.132.245] ([209.85.132.245:53329] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/33-59671-96F16874 for ; Thu, 10 Jan 2008 08:36:41 -0500 Received: by an-out-0708.google.com with SMTP id c18so139716anc.1 for ; Thu, 10 Jan 2008 05:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=u2Whl5OXGpHpFTfWfmuq6zsWTy88Gwwp/oRZLQ4fdo0=; b=KbjBSpuO/YgjIUdkPtRpD6Af0w3eY7mI/l4/2WzMwZrKYnHPW1J3gmgP53RETzEvGg7Pu7u5ECcxoLkvMXdKo5UUabz++6lUf1y4zIgaC8v/0mKYqir7iNDOjzixXyP8JCc4J1nMLqQ+mw5EAk8JkBCwf/myTl6/U6/FaMMZgu8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=ZfHpd22IIyEMFZa5gFHbqjYP8ZFBWyYttC/KaOp/5eFG+dUQiEsE62Vb0+rWHUOAZF8tSFJ2hC//hcSZJ4z82ckWcCEnz0pNkN19aU+1ZHXBh0egiYElve8HrtGKUdq2t4S7vYDmcYeJMMs0X7i13ySbBlzUCTHwg6YN3U+H/08= Received: by 10.100.251.5 with SMTP id y5mr4155162anh.75.1199972197945; Thu, 10 Jan 2008 05:36:37 -0800 (PST) Received: by 10.100.254.10 with HTTP; Thu, 10 Jan 2008 05:36:37 -0800 (PST) Message-ID: Date: Thu, 10 Jan 2008 11:36:37 -0200 To: "Marcus Boerger" Cc: "Ryusuke SEKIYAMA" , internals@lists.php.net, "Stanislav Malyshev" In-Reply-To: <1665325616.20080110111902@marcus-boerger.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10280_29794901.1199972197936" References: <1665325616.20080110111902@marcus-boerger.de> Subject: Re: [PHP-DEV] [RFC] Square brackets shortcut From: saulovallory@gmail.com ("Saulo Vallory") ------=_Part_10280_29794901.1199972197936 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline If we are going to implement this, I think we should use the (b) syntax since its how you define array elements today On Jan 10, 2008 8:19 AM, Marcus Boerger wrote: > Hello Ryusuke, > > I like b) ! > > marcus > > Thursday, January 10, 2008, 11:07:36 AM, you wrote: > > > Hello, lists, > > > I'm tired to type "array()" many times. And I want to > > declare arrays more easily. So I wrote the patch for > > zend_language_parser.y which enables to declare arrays > > with square brackets like some other languages. > > > Stanislav, > > Sorry, I'm new in this list and I didn't know about past > > discussion. As Marcus says, I'd like to ask around again. > > > > There are three options: > > > a) Commit square bracket array shortcut patch > > keys and values are separated by colons. > > ( http://www.opendogs.org/pub/php-5.3dev-080109-sbar.patch ) > > e.g. > > $a = [1, 2, 3]; > > $b = ['foo': 'orange', 'bar': 'apple', 'baz': 'lemon']; > > > b) Commit square bracket array shortcut patch > > keys and values are separated by double arrows. > > ( http://www.opendogs.org/pub/php-5.3dev-080109-sbar2.patch ) > > e.g. > > $a = [1, 2, 3]; > > $b = ['foo' => 'orange', 'bar' => 'apple', 'baz' => 'lemon']; > > > c) Reject and keep using `array()'. > > e.g. > > $a = array(1, 2, 3); > > $b = array('foo' => 'orange', 'bar' => 'apple', 'baz' => 'lemon'); > > > These patches include the tests. > > > Which do you like? I like (a) the best. > > > > Regards, > > > > 2008/1/6, Marcus Boerger : > >> Hello Stanislav, > >> > >> tha makesw three then already, how about we ask around again? > >> Ryusuke, can you please start a new '[RFC] Square brackets shortcut' > thread > >> to collect opinions and pass along the patch for that? > >> > >> I like the anonymous function patch too. It is clean and simple. Maybe > you > >> want to start a second '[RFC] Anonymous functions' thread with that > patch. > >> > >> Can you also please add tests for both? > >> > >> marcus > >> > >> Wednesday, January 2, 2008, 7:51:06 PM, you wrote: > >> > >> >> the square bracket array syntax patch for PHP 5.3, > >> >> http://www.opendogs.org/pub/php-5.3dev-080101-sbar.patch > >> > >> > I remember we discussed that already and it was rejected then (even > >> > though myself and Andi liked it) - did the people that objected then > >> > change their minds? > >> > >> > >> > >> Best regards, > >> Marcus > >> > >> > > > > -- > > /** > > * Ryusuke SEKIYAMA > > * rsky0711@gmail.com > > */ > > > > > Best regards, > Marcus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- ______________________________________ Saulo Vallory descolando! - www.descolando.com.br LegoCode - www.legocode.com.br Neoconn Networks - www.neoconn.com +55 21 8182-0308 ------=_Part_10280_29794901.1199972197936--