[haiku-development] Re: BPath::Append() resets the original path in case of failure.

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 25 Feb 2009 17:35:31 +0100

On 2009-02-25 at 17:23:13 [+0100], Fredrik Holmqvist 
<fredrik.holmqvist@xxxxxxxxx> wrote:
> 2009/2/25 Stephan Aßmus <superstippi@xxxxxx>:
> > Since also SetTo() returns an error, and it could be argued that it should
> > not be destructive either, we may as well change that to behave more like
> > one would expect. What do other think? The problem with such changes is 
> > that
> > we don't really have the resources to check a lot of existing applications
> > for the effect of such a change. :-\
> >
> > Best regards,
> > -Stephan
> Why would you want to break a well documented and existing API that
> almost all apps use?


This is not an obscure corner case. AFAIK all storage kit class setters are 
destructive and render the object invalid when they fail (most have an 
InitCheck() even). So, while I agree that in a new API it would be nicer to 
have these BPath methods work differently, it's not even inconsistent as it 
is now. Nor it is particularly annoying -- one can just use the API as 

CU, Ingo

Other related posts: