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.
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.
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%.
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? */
--
Wbr,
Antony Dovgal
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php