2012/8/22 Levi Morrison <morrison.l...@gmail.com>:
>> Why did you change the equivalent code?
>> array_walk is the best(fast and memory efficient) way
>> to delete elements.
>>
>> This code may be refereed from old PHP users, therefore
>> we should write better code.
>>
>> If you don' t have good reason to do so, please revert
>> the change.
>
> The implementation you had may be faster, but that is certainly NOT
> what matters as long as both are correct. What matters in the RFC is
> clarity.  You have already said that too many people don't know about
> array_walk, so why would they understand array_delete in terms of
> array_walk?  Please do not revert the change as what I have written is
> more clear.

I don't say array_walk() is difficult, but people out there
just don't know it.

Why we should use inefficient example for internals?
Besides, if array_walk() is used, people who would like
to write patch for it will knew that most of code can be
borrowed from array_walk().

Thus, it may prevent reinventing wheel.

> The reason speed doesn't matter in behavior example is that once it is
> implemented in C it will be just as fast as array_walk, perhaps it
> will even be faster.

I cannot agree to this opinion.
I still think the example should be reverted.

Regards,

--
Yasuo Ohgaki
yohg...@ohgaki.net

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to