Re:D Language accepted for inclusion in GCC
by wtetzner on Wednesday June 21, 2017 @04:54PM
(#14607874)
Could there be a compiler flag to flip the default to @safe,so it doesn't have to be added to each file?
Re:D Language accepted for inclusion in GCC
by pjmlp on Wednesday June 21, 2017 @05:07PM
(#14607985)
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.
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.