Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,185 of 33,346    |
|    Dave Harris to nroberts    |
|    Re: Initialization and trivial construct    |
|    23 Apr 12 14:36:05    |
      9e9409ee       From: brangdon@cix.compulink.co.uk              roberts.noah@gmail.com (nroberts) wrote (abridged):       > Now, I am one to initialize everything in the constructor (when I       > don't forget and miss something) anyway so I don't have to think       > about it.              I don't see the policy as being against that. I thought this was about whether       members are initialised in the constructor's initialiser list, or in the       constructor's body. Either way members should be initialised before the       constructor       terminates.                     > What rather upsets me about this policy, and I do believe it's being       > made policy for the reason that Mr. Harris suggests, is that knowing       > whether something has a trivial constructor is not as obvious as       > asking, "Is it an int?"              I think the policy is over-stated as written. I suspect the intent is more       like,       "Use constructor initialiser lists if there is a good reason to, otherwise       don't       worry about it." One of the problems with writing a coding policy is they       bring out       the lawyer in us. One feels one has to find a form of words that expresses       exactly       what a "good reason" is. Mentioning a non-trivial constructor was a valiant       attempt.              (Reading a coding policy can also bring out the lawyer in us.)              -- Dave Harris, Nottingham, UK.                     --        [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca