Re: [PHP-DEV] [RFC] Iteration tools

2008-11-04 Thread Jared Williams
"Marcus Boerger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Ionut, > > some remarks about your proposal: > > 1) You can turn any array into a Traversable using > (Recursive)ArrayIterator. Though this solution is still slow. The issue is > that the c-level code needs to v

Re: [PHP-DEV] [RFC] Iteration tools

2008-11-04 Thread Kalle Sommer Nielsen
2008/11/4 David Zülke <[EMAIL PROTECTED]>: > Am 03.11.2008 um 16:41 schrieb Marcus Boerger: > >> 2) Ther are iterator_apply() > > owww that sounds like it really needs docs :> http://bugs.php.net/bug.php?id=30185 Long time standing bug :) -- Kalle Sommer Nielsen -- PHP Internals - PHP Runtim

Re: [PHP-DEV] [RFC] Iteration tools

2008-11-04 Thread David Zülke
Am 03.11.2008 um 16:41 schrieb Marcus Boerger: 2) Ther are iterator_apply() owww that sounds like it really needs docs :> smime.p7s Description: S/MIME cryptographic signature

Re: [PHP-DEV] [RFC] Iteration tools

2008-11-04 Thread troels knak-nielsen
On Tue, Nov 4, 2008 at 10:11 AM, Ionut Gabriel Stan <[EMAIL PROTECTED]> wrote: > Anyway, I see there's nobody else that would like this but it's ok, at least > now we have namespaces so that > I don't have to come up with ugly names like my_map() for these kind of > helper functions. I like the pr

Re: [PHP-DEV] [RFC] Iteration tools

2008-11-04 Thread Ionut Gabriel Stan
On 11/3/2008 17:41, Marcus Boerger wrote: Hello Ionut, some remarks about your proposal: 1) You can turn any array into a Traversable using (Recursive)ArrayIterator. Though this solution is still slow. The issue is that the c-level code needs to verify the current pointer every single time i

Re: [PHP-DEV] [RFC] Iteration tools

2008-11-03 Thread Marcus Boerger
Hello Ionut, some remarks about your proposal: 1) You can turn any array into a Traversable using (Recursive)ArrayIterator. Though this solution is still slow. The issue is that the c-level code needs to verify the current pointer every single time it uses it and that means traversing the array

[PHP-DEV] [RFC] Iteration tools

2008-11-03 Thread Ionut Gabriel Stan
Hello everybody, As a result of the advice given in the thread "array_key_exists BC break", I have written an RFC concerning some higher order functions that, I believe, could a helpful addition to the language. Please note that I'm a userland developer and have no clue about PHP internals s