[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn_stream_copy3() in svn_io.h

From: Edmund Wong <ed_at_kdtc.net>
Date: Wed, 08 Apr 2009 12:35:42 +0800

Greg Stein wrote:
>
> Proper use of goto can greatly simplify a function. Bending over
> backwards to create if/else sequences or flags or whatever... just in
> order to note "cleanup" status ... can be much more complicated than a
> simple goto.

Then I'll need to rethink my patch then because it does use quite
a bit of if ... else ... constructs. It probably might look better
with gotos.

>
> You'll also note that nearly all goto operations in the svn codebase
> are for exit cleanup. The classic "goto problem" is based around using
> goto as a control mechanism. When it is limited to just cleanup/exit,
> then it becomes a fancy "return" statement. Not really a goto.

Understood. Thanks for the clarification.

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1589768
Received on 2009-04-08 06:35:57 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.