[PHP4BETA] Re: foreach() syntax

From: Date: Thu, 08 Apr 1999 21:27:59 +0000
Subject: [PHP4BETA] Re: foreach() syntax
References: 1 2 3 4  Groups: php.version4 
Request: Send a blank email to php-version4+get-29@lists.php.net to get a copy of this message
Good enough reason for me. I actually prefer the Javascript syntax ("for (i in foo)") over the perl one, but the general ordering is the same. (It's also the same basic ordering in Bourne shell and DOS batch programming, to cite other irrelevant examples.) Jim On Apr 08, Zeev Suraski wrote: > At 01:49 08/04/99 -0400, Jim Winstead wrote: > >Why? Seems like being consistent with perl and Javascript would be > >a good thing. > > I'm generally not a big fan of consistency with Perl, but regardless, the > main motivation here was complexity of implementation, and the poor > performance of the easily implementable solution for the Perl-like syntax. > It can be implemented to recognize the original syntax, but making it > perform quickly is a bit problematic. We'd start with that syntax for now, > we can always add in another supported syntax in the future if we find the > time (without changing the building blocks, that's the beauty of > intermediate code). > > Zeev > -- > Zeev Suraski <zeev@zend.com> http://www.zend.com/ > For a PGP public key, finger bourbon@netvision.net.il > -- PHP 4 Beta

« previous php.version4 (#29) next »