I think GCSG can be read ambiguously on this point.

One could argue that a set_* method does in fact match the name of the 
variable.  It is not identical to the name of the variable.  I know that 
@scopatz's proposal is a standard patter, but I think the set_* pattern 
is also valid.

Given the example in GCSG, and the reduced ambiguity in reading it, I 
prefer the set_* pattern.

On 12/10/2013 12:25 PM, gidden wrote:
>
> In src/error.h:
>
> > @@ -20,6 +20,10 @@ class Error: public std::exception {
> >    /// Returns the error message associated with this Error.
> >    virtual const char* what() const throw();
> >
> > +  /// Returns the error message associated with this Error.
> > +  std::string msg() const { return msg_; }
> > +  std::string msg(std::string msg) { msg_ = msg; }
> To quote: Anthony - "GCSG accessors and mutators match the name of the 
> variable.<http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Function_Names#Function_Names>I 
> <http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Function_Names#Function_Names%3EI> 
> know prefixing with set_ is given as an example, but that is bad and 
> not consistent with the rule." Anthony - "I am not asking you to 
> change this throughout the code base. I am just asking you not 
> perpetrate this anti-pattern further. I agree that it wouldn't be fair 
> to hold the PR up based on this, so I won't. But I do think that 
> explicit get_/set_ are a valid criticism. Also the STL is not a 
> well-designed piece of code :). You can change this or not, but there 
> are my thoughts."
> … <#>
> On Tue, Dec 10, 2013 at 12:19 PM, Robert Carlsen 
> <notifications@github.com>wrote: In src/error.h: > @@ -20,6 +20,10 @@ 
> class Error: public std::exception { > /// Returns the error message 
> associated with this Error. > virtual const char* what() const 
> throw(); > > + /// Returns the error message associated with this 
> Error. > + std::string msg() const { return msg_; } > + std::string 
> msg(std::string msg) { msg_ = msg; } gcsg says to use set_msg and msg 
> (no get_msg). That is the convention we have in the rest of the core. 
> We worked so hard for style guide compliance. I don't think we should 
> pick-and-choose compliance. Also, IMO using overloaded methods to do 
> oppositeish operations can cause confusion. — Reply to this email 
> directly or view it on 
> GitHub<https://github.com/cyclus/cyclus/pull/656/files#r8241051> .
> -- Matthew Gidden Ph.D. Candidate, Nuclear Engineering The University 
> of Wisconsin -- Madison Ph. 225.892.3192
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/cyclus/cyclus/pull/656/files#r8241282>.
>

-- 
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --
Paul Wilson ~ UW-Madison ~ 608-263-0807 ~ cal: http://bit.ly/pphw-cal
Professor, Engineering Physics. ~ http://cnerg.engr.wisc.edu
Faculty Director, Advanced Computing Infrastructure