A safer interface for core.stdc

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 7 20:45:55 PST 2015


On 2/7/15 8:21 PM, H. S. Teoh via Digitalmars-d wrote:
> Come to think of it, is there any point in making malloc @safe/@trusted
> at all? I don't think it's possible to make free() @safe, so what's the
> purpose of making malloc callable from @safe code? Unless you make a
> ref-counted wrapper of some sort around it, in which case you might as
> well use RefCounted instead.

Same goes about e.g. fopen vs. fclose. I'm thinking just of increasing 
the quantity of safe code. -- Andrei


More information about the Digitalmars-d mailing list