DIP 1028---Make @safe the Default---Community Review Round 1

Walter Bright newshound2 at digitalmars.com
Wed Jan 15 18:26:31 UTC 2020


On 1/13/2020 12:37 PM, Steven Schveighoffer wrote:
> How does the DIP affect interfaces and class virtual functions? Especially 
> interfaces without marking will be a potential problem as there will be no 
> errors on a @system interface stub which now is tagged with @safe but has no 
> implementation to complain about. But an implementing class would fail to 
> compile potentially (and might be in a separate project). This is a fundamental 
> API difference that's not easy to account for. The DIP should address that process.

Unmarked introducing functions (such as the ones in Object) will have to be 
marked as @system. Later on we can mark them @safe as a separate transition issue.


> I noticed that even templated class member functions are currently @system 
> unless tagged @safe (for good reason). So there's going to be a lot of code out 
> there like this.

Templated functions get their safety inferred if not explicitly marked.


More information about the Digitalmars-d mailing list