memory safety checks and trust

Walter Bright newshound2 at digitalmars.com
Tue Apr 14 20:10:20 UTC 2020


On 4/14/2020 6:34 AM, Adam D. Ruppe wrote:
> Indeed, but isn't that what @safe is for? There should be a way do it 
> intentionally, to tell the compiler "trust me". That's my main point with this 
> thread - D is being overbearing now.
> 
> "Copy the pointer to that array please, D."


So, Adam, how do you feel about:

   @system int* pumpkin(int i) { return &i);

Timon says that should be an error. What is your opinion?


More information about the Digitalmars-d mailing list