From kde-devel Tue Dec 06 07:49:49 2005 From: David Johnson Date: Tue, 06 Dec 2005 07:49:49 +0000 To: kde-devel Subject: Re: C++ exceptions Message-Id: <200512052349.49465.david () usermode ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=113385541625538 On Monday 05 December 2005 11:17 pm, Guillaume Laurent wrote: > Nobody disputes that they are pitfalls, nobody claims they are a > panacea either. But discarding them because they can be misused is > silly. This same discussion pattern applies to just every C++ feature > (templates, multiple inheritance, STL, pick yours). You're missing my point. My point is that the nature of exception propagation means that it's an all or nothing affair. If a library uses it (such as kdelibs), then every application using that library must also use it or risk not catching a thrown exception. The same is not true for templates, multiple inheritance, STL, iostreams, RTTI, etc. While all of these are important, if they are not exposed in the API, then the application developer is not compelled to use them. The reason this is important is because C++ is a BIG language. It is unrealistic to expect a developer to use all parts of the language all the time. One thing I especially like about Qt is that you can be quickly productive without comprehensive expertise in all parts of the C++ language. A library which demands comprehensive knowledge (such as Boost) severly limits its audience. My argument isn't that exception are bad, or even dangerous. Rather it's that exceptions should not be part of a general purpose library's API. -- David Johnson >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<