discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: does GNUstep support exception as well as apple implementation?


From: Dr. H. Nikolaus Schaller
Subject: Re: does GNUstep support exception as well as apple implementation?
Date: Fri, 4 Jun 2010 17:04:34 +0200

Hi David,

Am 04.06.2010 um 15:30 schrieb David Chisnall:

On 4 Jun 2010, at 12:18, Shuduo Sang wrote:

Does it mean the exception implementation of GNUstep is not complete as well as Apple runtime?


There are two implementations of exception handling for use with GNUstep. One is the old NeXT-style implementation, using setjmp()/ longjmp(), which is slow, unsafe, and needs to die a quick and peaceful death. You may only use this with the NS_DURING family of macros.

Can you explain that a little?

My view is:

Exceptions are exceptions and should never occur in normal operation. So it does not matter that they are slow when they got rised (is this currect English?). Or you have a fundamental design problem. So, IMHO the only "cost" is the setjmp() hidden by the NS_DURING macro which AFAIK fills an array with some pointers and values.

And what is specifically unsafe with using them? They have been in use for 20 years now.

BR,
Nikolaus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]