nothrow function callbacks in extern(C) code - solution
w0rp via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 22 01:27:31 PDT 2014
On Sunday, 22 June 2014 at 00:23:06 UTC, Andrei Alexandrescu
wrote:
> On 6/20/14, 3:14 AM, Rainer Schuetze wrote:
>> We either have to be more conservative with annotating OS
>> functions or
>> relax the guarantees of nothrow or @nogc. Both alternatives
>> are not very
>> compelling.
>
> Callbacks passed into OS/clib functions are never supposed to
> throw so we must annotate them all with nothrow. C functions
> are never designed under the assumption callbacks may throw. --
> Andrei
Yeah. I think the signature should communicate, "Woah, hold on
there. That isn't going to work."
More information about the Digitalmars-d
mailing list