Hacker News new | ask | show | jobs
by pjmlp 3288 days ago
D being @system by default has already been discussed as a design error, but making @safe be the default would be a breaking change.

So it is up to the community if they want to accept such change.

I should note that they still need some help cleaning the standard library and compiler corner cases in regard to @safe.

1 comments

Could there be a compiler flag to flip the default to @safe,so it doesn't have to be added to each file?
It could eventually be an option I guess, but it would require anyway to recompile all code.

As always in such cases, to validate binary libraries, they need some kind of metadata to indicate they are safe libraries (aka they only use of @safe or @thrusted code).

.NET does this with MSIL metadata, Modula-3 does it directly on the module definition section, for example.