Boost logo

Boost :

From: Justin M. Lewis (boost_at_[hidden])
Date: 2003-05-03 22:59:10


----- Original Message -----
From: "Joel de Guzman" <djowel_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Saturday, May 03, 2003 8:32 PM
Subject: Re: [boost] Re: in/out parameters, codingstylesandmaintenance

> Justin M. Lewis wrote:
>
> > A little bit of an overly simple example. How about something more
> > like
> >
> > void MyGetCWD(c_out<std::string> cwd)
>
> [snip]
>
> > Or, how about,
> > void GetFileName(c_in_out<std::string> path, const std::string
> > &filter) {
>
> [snip]
>
> Gosh!, I can't resist... the API above is poor style, AFAICT.
> No wonder you are having tons of problems.
>
> You should just return the string. I suggest that you take a peek
> at the boost filesystem library for better API designs. Specifically:
>
> http://www.boost.org/libs/filesystem/doc/path.htm
>

Yes yes, the examples I make up while writing e-mail aren't spectacular, I'm
aware. But, you really can't tell me that you've never been in a position
where out params and in_out params are clearly useful.

> --
> Joel de Guzman
> joel at boost-consulting.com
> http://www.boost-consulting.com
> http://spirit.sf.net
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


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