memory safety checks and trust
bachmeier
no at spam.net
Tue Apr 14 14:38:10 UTC 2020
On Tuesday, 14 April 2020 at 13:34:00 UTC, Adam D. Ruppe wrote:
> 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
+1 Most of us aren't writing web browsers and probably none of us
are working on airplanes. Give us enough rope to shoot ourselves
in the foot. If I wanted a language to tell me how to program,
I'd still be using Go.
More information about the Digitalmars-d
mailing list