Re: [Libxmlplusplus-general] set_*() methods that return the input.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Samedi 16 Novembre 2002 23:45, Murray Cumming wrote:
> Some set_*() methods are like this:
> const std::string& set_something(const std::string& something);
>
> I really don't see the point of the return value. May I simplify this?

yes. In fact I don't like it much too. If user wants to get the assigned value 
just after the set, he can do a get. But most of the time it's not needed.

>
> I assume that I haven't yet convinced you that const-reference return
> values are a bad idea in general?

well, no. But I'm still thinking about it. So I may say a word about it one 
day or another :-)

Cheers,

Christophe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE913R0oNwgyKmVCd0RAqZAAJ4lL/puKqPNVJ0jyXBjBlyhrP4sFgCfUE8z
QWRZx5ZhC4+2JKsosatHqTs=
=ZgvU
-----END PGP SIGNATURE-----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]