RE: [PEAR-DEV] FW: PEAR Addition Proposal
| From: | Lukas Smith | Date: | Wed, 24 Dec 2003 11:29:10 +0000 |
| Subject: | RE: [PEAR-DEV] FW: PEAR Addition Proposal | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-24630@lists.php.net to get a copy of this message | ||
> From: Lukas Smith [mailto:smith@backendmedia.com]
> Sent: Wednesday, December 24, 2003 12:14 PM
> > From: Robert Peake [mailto:Robert@PeakePro.com]
> > Sent: Wednesday, December 24, 2003 8:47 AM
> >
>
> http://www.phpclasses.org/mirrors.html?page=%2Fbrowse.html%2Fpackage%2F114
> > .html
The first problem is that the code is GPL. Unfortunately we cannot accept
GPL'ed code because of the unclear situation in how GPL'ed PHP code affects
other GPL'ed PHP code. Therefore the license would need to move to LGPL,
PHP, BSD or something similar.
> > I would be happy to sanitize, format, and PHPDoc it. The underlying
> class
> > (loopedArray) probably belongs in the "Structures" section, whereas this
> > application is clearly in "HTML" category.
loopedArray:
There will be iterators in php5. loopedArray would really have to follow the
API to make it worthwhile (even for php4). But this shouldn't be too much of
a big deal. However I am unsure about the benefit as in php4 all the
function calls will probably hurt performance considerably. Maybe I am
missing something since I just quickly browsed the API. One more thing:
iterators really also make the most sense if you provide iterators with the
same API for all sorts of collections.
Ring class:
Also just briefly looking at the class and it looks like just a specialized
version of your loopedArray iterator which adds random? The webring
functionality around that is probably too trivial.
So to conclude I generally see iterators as something of large interest for
php5 since then php userland iterators will get speed up if they use the php
interal iterator interface. And I guess there is nothing wrong if people
want to start using them in php4 (pr php3 for that matter). Of course they
will give a performance hit, but they do provide the code reuse/ code
recognizing benefit.
However you may want to take a look at the recent two articles by Marucs
Boerger on php5 OO. Especially the last one in the most recent issue, where
he talks about iterators in php5.
Regards,
Lukas