

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
99 messages in net.php.lists.internalsRe: [PHP-DEV] Re: Short syntax for ar...| From | Sent On | Attachments |
|---|---|---|
| Stan Vassilev | FM | May 21, 2008 7:12 pm | |
| Felipe Pena | May 21, 2008 7:20 pm | |
| Stanislav Malyshev | May 21, 2008 8:53 pm | |
| Pierre Joye | May 22, 2008 2:46 am | |
| Antony Dovgal | May 22, 2008 2:56 am | |
| Pierre Joye | May 22, 2008 3:33 am | |
| Johannes Schlüter | May 22, 2008 6:56 am | |
| Pierre Joye | May 22, 2008 7:28 am | |
| Philip Olson | May 22, 2008 8:55 am | |
| Stanislav Malyshev | May 22, 2008 9:17 am | |
| Andi Gutmans | May 22, 2008 9:15 pm | |
| Brian Moon | May 22, 2008 9:29 pm | |
| Lokrain | May 23, 2008 1:28 am | |
| Pierre Joye | May 23, 2008 1:58 am | |
| Alexey Zakhlestin | May 23, 2008 2:06 am | |
| Jani Taskinen | May 23, 2008 4:45 am | |
| Eric Coleman | May 23, 2008 6:43 am | |
| Yi Wang | May 23, 2008 8:17 am | |
| Sebastian Deutsch | May 27, 2008 1:53 pm | |
| Sebastian Deutsch | May 27, 2008 3:58 pm | |
| Stanislav Malyshev | May 27, 2008 4:10 pm | |
| Jani Taskinen | May 27, 2008 4:14 pm | |
| Stanislav Malyshev | May 27, 2008 4:18 pm | |
| Sebastian Deutsch | May 27, 2008 4:21 pm | |
| Rasmus Lerdorf | May 27, 2008 5:27 pm | |
| Andrei Zmievski | May 27, 2008 5:48 pm | |
| Sebastian Deutsch | May 27, 2008 6:09 pm | |
| Greg Beaver | May 27, 2008 7:43 pm | |
| Philip Olson | May 27, 2008 8:45 pm | |
| Stanislav Malyshev | May 27, 2008 11:15 pm | |
| Antony Dovgal | May 27, 2008 11:21 pm | |
| Stanislav Malyshev | May 27, 2008 11:25 pm | |
| Antony Dovgal | May 27, 2008 11:28 pm | |
| Derick Rethans | May 27, 2008 11:31 pm | |
| Rasmus Lerdorf | May 27, 2008 11:43 pm | |
| Pierre Joye | May 27, 2008 11:52 pm | |
| Antony Dovgal | May 28, 2008 12:11 am | |
| Hans Åhlin | May 28, 2008 12:14 am | |
| Derick Rethans | May 28, 2008 12:19 am | |
| Alexey Zakhlestin | May 28, 2008 12:24 am | |
| Antony Dovgal | May 28, 2008 12:32 am | |
| Stanislav Malyshev | May 28, 2008 12:33 am | |
| Antony Dovgal | May 28, 2008 12:41 am | |
| Stanislav Malyshev | May 28, 2008 1:02 am | |
| Antony Dovgal | May 28, 2008 1:14 am | |
| Stefan Walk | May 28, 2008 1:32 am | |
| Lukas Kahwe Smith | May 28, 2008 1:43 am | |
| Lokrain | May 28, 2008 1:47 am | |
| Stan Vassilev | FM | May 28, 2008 2:34 am | |
| Jon L. | May 28, 2008 2:35 am | |
| David Zülke | May 28, 2008 2:54 am | |
| Lokrain | May 28, 2008 2:58 am | |
| Felipe Pena | May 28, 2008 4:27 am | |
| Ford, Mike | May 28, 2008 4:34 am | |
| Greg Beaver | May 28, 2008 4:57 am | |
| Richard Quadling | May 28, 2008 6:13 am | |
| Brian Moon | May 28, 2008 8:20 am | |
| Andi Gutmans | May 28, 2008 8:28 am | |
| Andi Gutmans | May 28, 2008 8:28 am | |
| Chris Stockton | May 28, 2008 8:56 am | |
| Mike | May 28, 2008 10:10 am | |
| Jani Taskinen | May 28, 2008 10:25 am | |
| Chris Stockton | May 28, 2008 10:54 am | |
| Brian Moon | May 28, 2008 11:06 am | |
| Jared Williams | May 28, 2008 11:30 am | |
| Gregory Beaver | May 28, 2008 12:11 pm | |
| Pierre Joye | May 28, 2008 12:32 pm | |
| Chris Stockton | May 28, 2008 12:43 pm | |
| Stanislav Malyshev | May 28, 2008 1:06 pm | |
| Stanislav Malyshev | May 28, 2008 1:16 pm | |
| Rasmus Lerdorf | May 28, 2008 9:31 pm | |
| Derick Rethans | May 29, 2008 3:56 am | |
| Derick Rethans | May 29, 2008 4:03 am | |
| Pierre Joye | May 29, 2008 4:10 am | |
| Marcus Boerger | May 29, 2008 5:48 am | |
| Brian Moon | May 29, 2008 7:54 am | |
| Jonathan Bond-Caron | May 29, 2008 8:02 am | |
| Sebastian Deutsch | May 29, 2008 9:13 am | |
| Johannes Schlüter | May 29, 2008 11:55 am | |
| Johannes Schlüter | May 29, 2008 12:05 pm | |
| Chris Stockton | May 29, 2008 1:32 pm | |
| Johannes Schlüter | May 29, 2008 2:44 pm | |
| Jani Taskinen | May 29, 2008 3:06 pm | |
| Stanislav Malyshev | May 29, 2008 4:03 pm | |
| Lester Caine | May 30, 2008 12:04 am | |
| Pierre Joye | May 30, 2008 2:00 am | |
| Sebastian Deutsch | May 30, 2008 8:19 am | |
| Philip Olson | May 30, 2008 9:14 am | |
| Sebastian Deutsch | May 30, 2008 9:23 am | |
| Lars Strojny | May 31, 2008 5:27 am | |
| Hans Åhlin | May 31, 2008 6:17 am | |
| Hans Åhlin | May 31, 2008 6:26 am | |
| Hans Åhlin | May 31, 2008 6:38 am | |
| Chris Stockton | May 31, 2008 8:42 am | |
| Sebastian Deutsch | May 31, 2008 8:42 am | |
| Lars Strojny | May 31, 2008 9:33 am | |
| Stanislav Malyshev | May 31, 2008 10:45 pm | |
| Marcin Kurzyna | Jun 1, 2008 5:23 am | |
| Rodrigo Saboya | Jun 2, 2008 12:29 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [PHP-DEV] Re: Short syntax for array literals [...] | Actions... |
|---|---|---|
| From: | Stefan Walk (et...@php.net) | |
| Date: | May 28, 2008 1:32:25 am | |
| List: | net.php.lists.internals | |
On Wednesday 28 May 2008 09:11:50 Antony Dovgal wrote:
On 28.05.2008 10:44, Rasmus Lerdorf wrote:
Today's web developer is typically writing half their app in some variety of Ecmascript, either Javascript or Actionscript and this array syntax is second nature to all those folks.
I don't recall any languages to introduce new syntax because it's so handy to those who come from PHP and I see no reasons for us to do it either. I perfectly understand that we (well, you) did it many times in the beginning, but I believe that time is now gone.
That is, maybe, because PHP didn't introduce any "new handy syntax" that could be borrowed from other languages.
The array syntax we have exists for many years and is used in gazillions lines of code, it's known to every developer who have ever seen a PHP script.
And cursed many times because it's so tedious to write ...
In the same time, the [] syntax will definitely confuse people (wth? this surely looks like invalid syntax!) and will only help to those how don't know PHP, but have a certain experience with *script languages, i.e. you're going to do a favor for 1% and confuse the remaining 99%.
If you look at the other mails, you'll see that it's not about helping people that don't know PHP but other languages, but helping people writing code that is more concise and readable ... [[1,2,3], [4,5,6], [7,8,9]] is far easier to read than the same thing with array().
And at last, but not least I don't see anything "more readable and maintainable" in using square brackets to initialize arrays when the same brackets are used to access them:
$a = [$a[1][2], 3]; /* wth does this mean? */
This "it's unreadable and confusing"-argument is odd. In years of helping people in ruby/python*-channels, I have seen many questions, many questions that would seem exceedingly dumb, but i can't recall a single time someone asking about []-literals for arrays/lists, even [] is the subscript operator too for these languages. So you'd imply that seasoned PHP developers are less quick to understand than people that are new to other languages ... Btw, do you complain because () is used a) to group expressions b) to call functions c) for language constructs like for ()? Any "wth"-moments there? Or do you wish that strings would be written as string(foo) instead of "foo"?
* Even a language that has the guideline "explicit is better than implicit" preferred [] because it's clear and concise ... doesn't that make you wonder?
-- Wbr, Antony Dovgal
Regards, Stefan
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php







