DIP 1028---Make @safe the Default---Community Review Round 1
Walter Bright
newshound2 at digitalmars.com
Sat Jan 4 04:21:05 UTC 2020
On 1/3/2020 3:30 PM, Johan wrote:
> I expect the change of default to be a _lot_ of work to deal with at Weka. I
> think it will not be easy at all, because there is a lot of templated code and
> code checking whether something compiles or not (`__traits(compiles)`). Every
> compiler update changes what compiles and does not compiles, and it is almost
> always very hard to track down how that changes the behavior of Weka's code. (If
> something doesn't compile, the error happens in a template that cannot be
> instantiated because some template 5 layers down is not instantiatable for
> example. The error won't say that of course...)
> With the @safe change, I'm expecting 100s of templates that will no longer
> compile or change behavior, and for very few of the compile errors will it be
> obvious what is going on. As said before, `@system:` is not going to help.
Templates without an explicit @safe/@trusted/@system will still get their safety
attributes inferred as before.
> I have no opinion on whether this is a good change or not. I just very much
> would like to get the message across that this change will be very disruptive
> and so please provide a long deprecation time (e.g. something like 2 years).
That's probably a good idea. Keep in mind that even when it is no longer a
-preview feature, there'll be a -revert switch there for a long time to continue
to use the old behavior.
I am interested to hear about your experience with this on Weka's codebase, and
am open to your advice on the timing.
More information about the Digitalmars-d
mailing list