| From | Sent On | Attachments |
|---|---|---|
| Ryusuke SEKIYAMA | Jan 10, 2008 2:07 am | |
| Marcus Boerger | Jan 10, 2008 2:18 am | |
| Saulo Vallory | Jan 10, 2008 5:36 am | |
| Hannes Magnusson | Jan 10, 2008 5:56 am | |
| Tomi Kaistila | Jan 10, 2008 6:12 am | |
| Giedrius D | Jan 10, 2008 6:18 am | |
| Sam Barrow | Jan 10, 2008 6:19 am | |
| Lukas Kahwe Smith | Jan 10, 2008 6:23 am | |
| Sam Barrow | Jan 10, 2008 6:36 am | |
| Sam Barrow | Jan 10, 2008 6:37 am | |
| Sam Barrow | Jan 10, 2008 6:39 am | |
| Hannes Magnusson | Jan 10, 2008 6:48 am | |
| Daniel Brown | Jan 10, 2008 7:03 am | |
| Andi Gutmans | Jan 10, 2008 11:35 am | |
| Andi Gutmans | Jan 10, 2008 11:40 am | |
| Pierre | Jan 10, 2008 11:46 am | |
| Derick Rethans | Jan 10, 2008 12:09 pm | |
| David Coallier | Jan 10, 2008 3:21 pm | |
| Larry Garfield | Jan 10, 2008 5:17 pm | |
| Tomi Kaistila | Jan 10, 2008 10:15 pm | |
| Ron Radko | Jan 10, 2008 10:29 pm | |
| Antony Dovgal | Jan 11, 2008 12:55 am | |
| Jani Taskinen | Jan 11, 2008 2:02 am | |
| Geoffrey Sneddon | Jan 11, 2008 6:17 am | |
| Mark Dennehy | Jan 11, 2008 6:28 am | |
| Geoffrey Sneddon | Jan 11, 2008 6:38 am | |
| Max Antonov | Jan 11, 2008 7:06 am | |
| Darius Jahandarie | Jan 19, 2008 7:26 pm | |
| taylor luk | Jan 20, 2008 9:36 pm | |
| Eric Coleman | Feb 17, 2008 10:31 am |
| Subject: | Re: [PHP-DEV] [RFC] Square brackets shortcut | |
|---|---|---|
| From: | Saulo Vallory (saul...@gmail.com) | |
| Date: | Jan 10, 2008 5:36:14 am | |
| List: | net.php.lists.internals | |
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 <hel...@php.net> 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 <hel...@php.net>:
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 * rsky...@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





