From: Justin M. Lewis (boost_at_[hidden])
Date: 2003-04-25 18:53:56
You're missing the point. Personally I see the need for out and in/out
params. While some of you may not like them, I use them, as do others. The
question then becomes, when reading my code, would you rather see
f(out(x), in_out(y), z);
Would you rather the outcome be obviously clear? Or would you rather have
to track down the source? The same thing goes for if you were reading code
that someone else wrote who used my library, which way would you prefer it?
Would you prefer to have to have a complet understanding of every single
function call made in a program, or would you prefer that as much
information as possible is given at the point of invocation? You're welcome
to go out of your way to write your code to never use out or in/out params,
although I think that's impractical in a lot of cases, that doesn't mean
that everyone else is going to do the same.
----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Friday, April 25, 2003 2:50 PM
Subject: Re: [boost] in/out parameters, coding styles and
> "Justin M. Lewis" <boost_at_[hidden]> writes:
> > Even if you want to argue you don't LIKE out and in/out params, that
> > mean other people don't use them. So, working under the assumption that
> > they ARE used, would you rather see,
> > f(x, y, z);
> > or
> > f(out(x), in_out(y), z);
> > in the code, so you KNOW at the point of invocation what's going on?
> > point here is so that, when you're reading the code later you can see
> > the person before you was doing. Obviously if you're the one writing
> > designing all of the code, you don't need clarification on what your own
> > intent was.
> But if I can retrofit f() to require these out/in_out things, I can
> also redesign it to avoid out parameters, can't I?
> Dave Abrahams
> Boost Consulting
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk