Re: dropping curly braces
| From: | Derick Rethans | Date: | Fri, 18 Nov 2005 11:48:07 +0000 |
| Subject: | Re: dropping curly braces | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20140@lists.php.net to get a copy of this message | ||
On Fri, 18 Nov 2005, Andreas Korthaus wrote:
> Derick Rethans wrote:
>
> > > That's the problem - also grep does not know if [] is used for arrays or
> > > stings. That's the same for programmers, it's often not easy to conclude
> > > from
> > > context - that's my point.
> >
> > grep won't, but php -l will.
>
> That's true. But what about "reducing complexity"?
>
> Don't you think it's useful to allow a convention like {} for strings and []
> for arrays, so you can be sure what $str{1} means without looking at any
> context?
No.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org