Boost logo

Boost :

From: Justin M. Lewis (boost_at_[hidden])
Date: 2003-04-24 10:03:47


I diagree with this. The code I've written using this looks more like

void add_char( in_out<std::string> str, char ch)
{
  std::string &s = str;
  s += ch;
}

----- Original Message -----
From: "John Torjo" <john_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Thursday, April 24, 2003 5:20 AM
Subject: Re: [boost] Re: class proposal

>
> > void f( in_out< int > is_not_changed_ )
> > {
> > // use is_not_changed_, but don't change it
> > }
>
> I think there would be a much bigger problem (code inside the function
would
> change).
>
> Just consider
>
> void add_char( std::string & str, char ch)
> { str += ch; }
>
> Now, if we change it so be in_out, we'll have to use a .ref()-like
function.
>
>
> void add_char( in_out<std::string> str, char ch)
> { str.ref() += ch; }
>
> Of course, this is a simple example, but it illustrates the point.
> The code would become obfuscated.
>
> Frankly, I donot like it.
>
> Best,
> John
>
>
> _______________________________________________
> 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