Re: Iterators?
| From: | Martin Jansen | Date: | Mon, 23 Jun 2003 05:37:22 +0000 |
| Subject: | Re: Iterators? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17634@lists.php.net to get a copy of this message | ||
On Mon Jun 23, 2003 at 01:4042AM +0200, Harry Fuecks wrote:
> Wondering what the general feeling is about PEAR providing some standard
> iterators? I know that there's a resistance to dependancies between
> packages but iterators (even if it's just PHP's foreach) are so common in
> PHP that having standard ones available in PEAR could add alot of value.
>
> While working on XML_SaxFilters (http://marc.theaimsgroup.com/?l=pear-
> dev&m=105631965923509&w=2) for example I had to write my own simple
> iterator for reading data (the ReaderInterface). Ideally I would have liked
> to use a PEAR iterator package if one existed.
Do you really think that having Iterators implemented in userland will
help us a lot? I'm a bit afraid that while they may be useful in some
situations, they will slow the code down like hell when being used
extensively.
If they were implemented in C, this would certainly be different.
--
- Martin Martin Jansen
http://martinjansen.com/