Mathias Bank wrote:
It don't think so: PHP is a good language, but writing code in PHP is sometimes awful. This could be improved by an alternative syntax. This could help new developers who are coming from another language. This could make coding funnier for some developers.

Alternative syntax is what makes reading someone else's Perl code
"funny" ... ;(

> So: what's the matter? The idea of [] does not harm existent code.
> Everyone who does not like this syntax can avoid it in his code.
> But please don't tell others how they have to write their code!
> Let them write!

This violates a simple but important principle:

  The burden shall be on the writer, not the readers.

As long as you write code all by yourself and never share it in
any way your argument may hold true. The very second your code
needs to be read or even maintained by others alternative syntax
choices quickly become a nightmare. So you have to agree on one
form or the other and add yet another item to your coding style
rules list. So you even have to bother *more* about telling
others (or yourself) how to write code than you had to with only
one syntax alternative.

As a matter of taste i do prefer the [] alternative over the
current array()/list() approach. But we can't get rid of array()
or list() any time soon, even if we would decide to deprecate them
now in favor of []. So we're stuck with them and the nicer syntax
does not justify the can of worms opened by introducing an
alternative syntax for an already existing feature.

So if we were designing PHP today i'd be all for [] and [] only,
but as things are my vote is mostly against it even though i sort
of like the syntax.

So from my side a

  -0.8

--
Hartmut Holzgraefe, Senior Support Engineer                            .
MySQL AB, www.mysql.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to