Rasmus Lerdorf wrote:
On Wed, 5 Nov 2003, Ilia Alshanetsky wrote:

On November 5, 2003 10:34 am, Christian Schneider wrote:

PHP is a mix of C, Perl and other styles anyway, why deny it? It's
strength is that it's a pragmatic and simple language but that doesn't
mean that nothing should be changed ever.

PHP strength (IMHO) is it's simple and clear syntax, which allows people who come from background in other programming languages can quickly recognize and get used to. Creating confusing alternate syntaxes will bring us ever closer to Perl 6 where there are dozens of way to do the same thing. The end results in a confusing and hard to read/write language that all but the most dedicated of users refuse to use.


Well, like I said before, I am not sure this is a clear case of that. I'm probably the biggest defender around of the no-magic rule, but [] does imply something array-related to most people, so I think the magic part is much smaller than in other proposals we have seen.


But isn't there a big difference between an assignment and a reference?
I, for one, think that language constructs should be as univocal as possible in order to minimize confusion, lest we end up having to read something like:


$a = [[1,2,3],[1=>[1,3,2,2], "a"=>[[1,2,3,4],4,[1,2]]];

I don't know about you, but I can't even begin to count the brackets in there... :-)

Cheers,


Marco


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



Reply via email to