DIP 1028 dub packages test package "sml"
james.blachly at gmail.com
Mon Jan 6 13:42:38 UTC 2020
On 1/4/20 8:39 PM, Jon Degenhardt wrote:
> On Sunday, 5 January 2020 at 01:13:14 UTC, Jon Degenhardt wrote:
> Looking more closely at DIP 1000 doc - It appears to be saying that the
> compiler will try to prove addresses taken of local variable cannot be
> escaped. If the compiler can prove this, the function will pass @safe
> even it the address of locals is taken. If the compiler cannot prove it,
> the code will need to be rewritten to pass @safe.
> So no hard rules about taking the address of local variables or not.
> Developers need to try it and see. Is this a reasonable summary?
+1, I would love for this to be documented somewhere [that is easy to find]
More information about the Digitalmars-d