all OS functions should be "nothrow @trusted @nogc"
Vladimir Panteleev via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 31 06:33:59 PDT 2017
On Wednesday, 26 July 2017 at 17:48:21 UTC, Walter Bright wrote:
> On 7/26/2017 6:29 AM, Kagamin wrote:
>> Should we still try to mark them safe at all?
>
> Marking ones that are safe with @safe is fine. OS APIs pretty
> much never change.
Sometimes operating systems add new flags to their API which
change how some values are interpreted. Some API functions may,
for example, normally take a pointer to a such-and-such struct,
but if a certain flag is specified, the parameter is instead
interpreted as a pointer to a different data type. That would be
one case where an API call becomes un- at safe due to the addition
of a flag.
More information about the Digitalmars-d
mailing list