Re: dropping curly braces
| From: | boots | Date: | Fri, 18 Nov 2005 16:09:07 +0000 |
| Subject: | Re: dropping curly braces | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-20163@lists.php.net to get a copy of this message | ||
Hi.
Is there really a good reason to drop {} string access? Does it make
the engine better? Are you going to use {} for something else? If not,
then wouldn't it make logical sense to do what was documented and drop
the [] syntax? Sure, I've read the argument that [] is used in other
languages but as we all know, PHP != (insert language) so that is not
really valid. I've read the argument that [] "makes more sense" but
obviously it has long ago been decided and documented otherwise. I've
read that dropping [] will break apps -- but that is equally true for
{}. There seems to be no reason for this other than whim and that
leaves a sour taste.
Yes, we will update our codebases (thanks for the extra and pointless
work, btw) but not to [] for string access but rather substr() which I
hope is safer long-term. Future proofing is getting much harder because
now we can't even rely on documented behaviours and existing
deprecation notices. Some people will say, "Oh, it is safe to use [] so
don't worry" but it seems that these same people said that about {}. If
this makes PHP better in some way I could see the need but as it is, it
seems like a pity to me.
Best.
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com