From kde-devel Tue Aug 12 14:29:54 2014 From: Sune Vuorela Date: Tue, 12 Aug 2014 14:29:54 +0000 To: kde-devel Subject: Re: code convention Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=140785383913959 On 2014-08-12, Rodrigo Bonifacio wrote: > Dear kevin, I am conducting a survey about the use of exception > handling constructs in C++. I would really appreciate if you could > contribute to this research by answering a few questions on the > subject. > > The survey is available on-line: > > https://pt.surveymonkey.com/s/exceptionHandling The survey misses options. The main reason why I don't use exceptions and recommend people to stay away from exceptions is that exceptions in c++ is hard. You very easily leak resources. There is no possibility to have compiler-checks that specific exceptions are handled (think java's checked exceptions). You can only emulate a try-finally thing with raii-structs, but that's more bulky. And c++-exceptions don't have stacktrace information. I develop stuff at work sometimes in java, sometimes in c++ (often with Qt) and enjoy using exceptions in java just as much as I avoid using them in c++. /Sune >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<