all OS functions should be "nothrow @trusted @nogc"

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 26 16:56:14 PDT 2017


On 07/26/2017 06:16 PM, Steven Schveighoffer wrote:
> So I guess I should restate that we can assume no implementations exist 
> that intentionally cause UB when stream is NULL (as in Timon's example). 
> Either they check for null, and handle gracefully, or don't check and 
> segfault.

No need to worry about that at all. If worse comes to worst - i.e. we do 
port to such an implementation - we can always provide a thin wrapper 
that checks for NULL then calls the native function. No need to change 
the signatures. -- Andrei


More information about the Digitalmars-d mailing list