So, all I heard as reasons not to introduce the '[]' syntax for
creating arrays is because "'array()' is perfectly fine" and that it
wouldn't make sense to have two syntaxes (compared to other legacy
stuff in PHP). And certainly nobody has an objection to the fact that
developers have to learn that []s are used in arrays for accessing
indexes of an array, so why would it be a problem to learn at the same
time that arrays could be created with the same []s? Sane people will
see ["foo", "bar"] and say "wow, that looks like a list. That must be
a list!" I see array("foo", "bar") and I say "wow, why am I calling a
function to create something so basic as an array?" (Though,
admittedly it is not a function – it does, however, appear to be one.)

So, if you do have problems with array literals using the [] syntax,
please, do you mind expressing them here? I understand you gave
rebuttals, but nothing particularly similar to simple arguments
against it.

M.T.

Reply via email to