[haiku-commits] Re: r40762 - haiku/trunk/src/apps/terminal

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 02 Mar 2011 14:05:47 +0100

Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> Am I the only one thinking that the BObjectList::RemoveItem() 
> deleteIfOwning 
> parameter should not have a default? I find the current situation 
> rather 
> inconsistent with RemoveItemAt() which doesn't have such a parameter 
> and 
> doesn't delete the object either.

The API certainly won't win any prices :-)
There is a semantical difference between the two methods, though: 
RemoveItemAt() returns the item in question (that you don't know 
before), ie. it passes it over to your responsibility, while 
RemoveItem() does not, the ownership is kept with the list (if that 
actually claims ownership).
Having names that make this difference clearer would be appreciated, 


Other related posts: