Re: Array syntax []
| From: | Derick Rethans | Date: | Fri, 11 Jan 2008 08:31:46 +0000 |
| Subject: | Re: Array syntax [] | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34683@lists.php.net to get a copy of this message | ||
On Thu, 10 Jan 2008, Andi Gutmans wrote:
> I think almost everyone here agreed it'd benefit them and maybe the ones
> who don't would go through the same process I went through once they get
> used to it J
I don't know about that, I for once find it silly to even try to argue
that [] is a good idea, but at the same time are fully against scalar
typehints.
It is argued that [] is good for readability, although looking up [ or ]
anywhere will not produce results. Hence, it is more cryptic to use,
harder to find information on - and it doesn't provide any *new*
functionality. array() has been working fine for more than 10 years.
On the other hand, it is argued that scalar typehints are confusing for
new users. I don't see how because it is much easier to provide
search-index information for on our website, and they actually provide
new functionality as they make it users for users of libraries to see
instantly whether they use that library correctly.
regards,
Derick
--
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org