memory safety checks and trust
Timon Gehr
timon.gehr at gmx.ch
Thu Apr 16 03:06:38 UTC 2020
On 14.04.20 22:10, Walter Bright wrote:
> 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.
That's actually not what I said. I said I would not be opposed to it
being an error.
More information about the Digitalmars-d
mailing list