return-value policy question

Mark Mitchell mark@codesourcery.com
Tue Apr 29 15:58:00 GMT 2003


On Tue, 2003-04-29 at 07:50, Nathan Myers wrote:
> On Tue, Apr 29, 2003 at 04:26:12PM +0200, Gabriel Dos Reis wrote:
> > [abuse]
> 
> Gaby, your remarks did not address _any_ of the questions asked.
> If you would care to post something on topic, I would be happy
> to read it.  Anybody else, _please_?

Programming style is obviously a highly contentious subject.

There are coding standards, used for life-critical systems development,
that forbid multiple returns from functions.  There are studies that
have shown that people tend to do things like move code past the early
return statements by accident in that case; in other words, the code is
less robust against non-ideal programmers.

But then there are other people who make the arguments you do.

I don't think there's an objective truth here.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com



More information about the Libstdc++ mailing list