Re: Extension proposal
| From: | Paul Chandler | Date: | Mon, 29 Oct 2007 04:24:46 +0000 |
| Subject: | Re: Extension proposal | ||
| References: | 1 2 3 4 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4913@lists.php.net to get a copy of this message | ||
Stanislav,
I think it's practical. My belief is that, like the use of other iterators,
it tends to be more expressive and less error prone. But, I wouldn't remove
for(;;) from the language, like Python. It's nice to have options.
On 10/28/07 8:51 PM, in article 472558D0.9070504@zend.com, "Stanislav
Malyshev" <stas@zend.com> wrote:
>> Do you need any other reason than "it's like Python?" :)
>>
>> First, there's the memory conservation. You don't need to pre-allocate an
>> array. Second, it's an objectified range iterator / generator. This means
>> you can combine it with SPL and even your own custom iterators.
>
> Is it really practical? I'm not set against it, but what's wrong with
> good old for($i=0;$i<100;$i++)?