On Aug 25, 2012, at 2:12 PM, Jonathan Schleifer wrote:
> Am 25.08.2012 um 23:10 schrieb John McCall:
>> Is there a particular reason why you don't want the exception models to 
>> interact correctly?  It's quite straightforward to make it work when you've 
>> designed things properly.
> 
> Yes, I don't really like a dependency on libstdc++. Plus I can't think of too 
> many cases where it makes sense to throw in C++ and then catch in ObjC or 
> vice versa. What's the advantage of using @catch instead of catch?

It's pretty useful to be able to catch an arbitrary exception from either 
language — for one, it's a hard requirement of @finally that a single 
personality can catch anything.  It also means that C++11's std::exception_ptr 
will correctly be able to shift your exceptions around between threads.  It's 
also what Clang happens to enforce, so you'll need to add a bunch of new 
checking if you don't want to do it. :)

You don't need to depend on the full libstdc++;  you can just rely on the 
ABI-level library (libsupc++ / libc++abi).

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to