memory safety checks and trust
Adam D. Ruppe
destructionator at gmail.com
Tue Apr 14 13:34:00 UTC 2020
On Tuesday, 14 April 2020 at 09:56:39 UTC, Walter Bright wrote:
> As to the other case, to my mind putting the address of a stack
> local into a GC allocated object is highly suspicious:
>
> 1. it is very very easy to do it unintentionally
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."
"I'm afraid I can't do that, Adam."
https://www.youtube.com/watch?v=ARJ8cAGm6JE
More information about the Digitalmars-d
mailing list