On Mon, 20 Dec 2010 19:41:29 -0000, Matthew Turland <tobias***@*mail.com>wrote:Thanks to comments from Gustavo Lopes, I've removed the removeCommonmethod from my patch. I honestly wish I could say why I didn't realizehis point before I submitted the patch in the first place, but Iappreciate the feedback. I've attached the amended patch files, whichinclude only the removeUncommon method, which I definitely know doesnot already exist in the class.

php-src-5.3-patch.diff is against php/php-src/branches/PHP_5_3phpdoc-en-trunk-patch.diff is against phpdoc/en/trunk

As for the comments regarding the naming conventions, I do agree to acertain extent. However, I would like to remain consistent with theformat of names of existing methods. I suggest a separate patch besubmitted with method aliases to deal with that situation. If anyonehas a better name for the removeUncommon method, I'm open tosuggestions.

Any further feedback and/or approval/merging would be appreciated."Remain consistent with the format of names of existing methods"would imply calling the method "retainAll" since the set operations"addAll" and "removeAll" are presumably inspired in Java and "retainAll"is the name given to the method that has these semantics. I would berelatively comfortable with something like "removeExceptAll" or"intersectWith" but the first is awkward and the second would be moreappropriate for a method that would return a new set instead of relying oncollateral effects.I think "removeUncommon" is an infelicitous choice, it forces you to thinkabout what the "uncommon" elements in the two sets are, which isunnecessary to understand the semantics of the method; all you have to dois remove everything from the first that isn't in the second (or retainthe common ones), i.e., the uncommon ones on the second don't matter atall. "retainAll" and "removeExceptAll" express this clearly,"intersectWith" has an immediate visual appeal, "removeUncommon" is a bigcognitive burden.Other than that, +1