DIP 1025--Dynamic Arrays Only Shrink, Never Grow--Community Review Round 1
Paolo Invernizzi
paolo.invernizzi at gmail.com
Mon Nov 11 22:02:49 UTC 2019
On Monday, 11 November 2019 at 21:41:14 UTC, Walter Bright wrote:
> On 11/11/2019 5:13 AM, Dennis wrote:
>> [...]
>
> That's right. I had overlooked that.
>
>
>> [...]
>
> Imagine these 3 lines are spread out over a large code base.
>
>
>>> [...]
>
> Memory safety cannot be achieved without control over who is
> the owner of memory.
>
>
>> [...]
>
> @trusted void myfree(void* p) { free(p); }
> free(slice.ptr);
That's not @safe code, it's @trusted, it's not mechanically
checkable, and all the horrors summoned in a programmers mind can
happens here. My impression is that this is not the point at all.
More information about the Digitalmars-d
mailing list