This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __attribute__((cleanup(function)) versus try/finally


mark@codesourcery.com (Mark Mitchell)  wrote on 07.05.03 in <1052345885.5665.64.camel@doubledemon.codesourcery.com>:

> Seriously, one of the few remaining objections to programming in C++ has
> been "exceptions add too much overhead".  Once we add unwind tables to C
> -- as all of our proposals do, including mine -- I'm not really sure
> what the point of programming in C is going to be any more.

To me, the worst thing about C++ is the syntax. As someone who wrote a  
parser, I'm sure you know better than I where all the skeletons lie.

The second worst thing is the concept of "POD" vs. "non-POD" types. This  
seems expressly designed to violate the principle of least surprise.

Exceptions aren't even in the running. Exceptions are something that's  
present in almost every modern language - but most don't have syntax  
backtracking, or types both with and without initialization by default  
(and you can't add it to those that haven't got it without major surgery).

Programmer overhead, to me, is much more important than implementation  
overhead. Especially if the implementation overhead is only on the slow  
path.

MfG Kai


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]