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 31,646 of 33,346    |
|    Martin B. to A. McKenney    |
|    Re: Looking for an elegant way to conver    |
|    08 Nov 11 00:17:51    |
      e047a545       From: 0xCDCDCDCD@gmx.at              On 06.11.2011 09:45, A. McKenney wrote:       > Francis Glassborow wrote:       >       >> ... Too many mediocre programmers do not realise that exceptions       >> are not just another way to handle error situations but deliver useful       >> resource handling....       >       > I confess, this statement baffles me. What sort of "useful       > resource handling" do exceptions provide in non-error situations?       >       >> ... Yes you can do it all with error codes but I will bet       >> that any programmer who wants to use error codes instead of exceptions       >> will write code that leaks like a sieve (and the leaks will not just be       >> memory but scarce resources as well)       >       > I would argue the opposite.       >       > It is much harder to write code that does _not_ leak resources if you       > have to worry about exceptions. Nobody had to worry about exception       > safety before exceptions were introduced. Exceptions simply added more       > possible ways to leak resources, (...)              Ah. The good old times of no exceptions! (*)              So you're a fan of code like this?:       developer.mozilla.org/En/Mozilla_Coding_Style_Guide#Use_the_nice_macros              cheers,       Martin              (*): Though I wonder *when* these actually were, considering that on       Windows, even C has exceptions:       http://msdn.microsoft.com/en-us/library/windows/desktop/ms680657       28v=VS.85%29.aspx                     --        [ 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