Is @safe still a work-in-progress?

Walter Bright newshound2 at digitalmars.com
Sat Aug 18 03:08:35 UTC 2018


On 8/17/2018 5:30 AM, Atila Neves wrote:
> It's not easy though. You have to either be building your own phobos

Not really. You only have to be able to import phobos files. You don't have to 
compile something that will link.

I.e. just copy the phobos source tree, add @safe to it, and point the compiler 
at that one.


> or sudo 
> editing files in /usr/include. You can, but it's a pain. Then there's finding 
> out exactly where in a chain of 10 template functions that it became @system...

I recently fixed the compiler to say which template overload was used. It's a 
huge time saver.

But you're currently doomed on this anyway, as an awful lot of Phobos winds up 
calling put(), which cannot be inferred as @safe without:

https://github.com/dlang/dmd/pull/8504


More information about the Digitalmars-d mailing list