home bbs files messages ]

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,201 of 33,346   
   Martin B. to Miles Bader   
   Re: Initialization and trivial construct   
   26 Apr 12 14:17:54   
   
   From: 0xCDCDCDCD@gmx.at   
      
   On 25.04.2012 20:31, Miles Bader wrote:   
   > Gene Bushuyev  writes:   
   >> What you're describing is this: your class needs to create another   
   >> complex or costly object, which it then uses as an organ donor to   
   >> initialize (or assign) its own members. Perhaps, if the class   
   >> contained that complex or costly object instead of its organs would   
   >> be a better design and made this procedure unnecessary.   
   >   
   > Certainly one way (...) it's a workaround, not "better design."   
   >   
   > If the intermediate value is small / doesn't consume too many   
   > resources, then whatever, maybe it's an _acceptable_ workaround, but   
   > it's still a workaround.   
   >   
   > [E.g., (...)]   
      
   Miles - maybe you could dig up one concrete example from your code base?   
   Would help to show what you mean ...   
      
   cheers,   
   Martin   
      
   --   
   Good C++ code is better than good C code, but   
   bad C++ can be much, much worse than bad C code.   
      
      
         [ 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