Boost logo

Boost :

From: Gregory Colvin (gregory.colvin_at_[hidden])
Date: 2003-04-25 19:12:23


On Friday, Apr 25, 2003, at 13:18 America/Denver, Justin M. Lewis wrote:

> Even if you want to argue you don't LIKE out and in/out params, that
> doesn't
> 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?
> The
> point here is so that, when you're reading the code later you can see
> what
> the person before you was doing. Obviously if you're the one writing
> and
> designing all of the code, you don't need clarification on what your
> own
> intent was.

As I said, I'm fine with f(&x, &y, z).

But then I don't consider pointers evil ;->

I could see the point of the fancier approach in the context of a
framework
for dealing with RPC, COM, and similar APIs that make heavy use of out
and
in/out parameters, but even then I have my doubts.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk