Re: Naming convention for accessor methods (get/set)
I believe Stroustrup favours the style of accessor where a single
overloaded function name is used for both getting and setting.
At least, ISTR seeing such a thing in the C++ book, and didn't see
any get_x() or set_x() methods.
--
Ed Avis <ed@membled.com >
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
I believe Stroustrup favours the style of accessor where a single
overloaded function name is used for both getting and setting.
At least, ISTR seeing such a thing in the C++ book, and didn't see
any get_x() or set_x() methods.
--
Ed Avis <ed@membled.com >
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
Comment