Re: [PATCH] SplObjectStorage::removeCommon and removeUncommon
| From: | Hannes Magnússon | Date: | Sun, 19 Dec 2010 15:24:12 +0000 |
| Subject: | Re: [PATCH] SplObjectStorage::removeCommon and removeUncommon | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51089@lists.php.net to get a copy of this message | ||
On Sun, Dec 19, 2010 at 16:16, Gustavo Lopes <glopes@nebm.ist.utl.pt> wrote:
> On Sun, 19 Dec 2010 15:12:17 -0000, Hannes Magnússon
> <hannes.magnusson@gmail.com> wrote:
>
>> On Sun, Dec 19, 2010 at 16:05, Gustavo Lopes <glopes@nebm.ist.utl.pt>
>> wrote:
>>>
>>> On Sun, 19 Dec 2010 15:03:22 -0000, Hannes Magnússon
>>> <hannes.magnusson@gmail.com> wrote:
>>>
>>>> On Sun, Dec 19, 2010 at 15:49, Gustavo Lopes <glopes@nebm.ist.utl.pt>
>>>> wrote:
>>>>>
>>>>> On Sun, 19 Dec 2010 05:33:56 -0000, Matthew Turland
>>>>> <tobias382@gmail.com> wrote:
>>>>>
>>>>>> Attached are source/test and manual patches for the addition of two
>>>>>> methods to the SplObjectStorage class. These methods, removeCommon and
>>>>>> removeUncommon, add support for the difference and intersection set
>>>>>> operations, respectively.
>>>>>
>>>>> I'm sorry, I must be missing something because what exactly is the
>>>>> difference between removeCommon and removeAll?
>>>>
>>>> Is this just bikeshedding over the method names, or did you not bother
>>>> reading the patches? (the doc patch even includes examples).
>>>>
>>>
>>> I did, and near the end it has:
>>>
>>> SPL_ME(SplObjectStorage, removeAll, arginfo_Object, 0)
>>> + SPL_ME(SplObjectStorage, removeCommon, arginfo_Object, 0)
>>>
>>> So there's already a removeAll.
>>>
>>
>> Read the doc patch. The description says it all, but if you still
>> wonder then look at the example.
>>
>
> In the example, substituting removeCommon by removeAll has exactly the same
> result:
Haha. I was under the impression removeAll().. did what the method
name says, sorry :P
-Hannes