Direction for @safe/-dip1000

Paul Backus snarwin at gmail.com
Mon Feb 14 22:58:07 UTC 2022


On Monday, 14 February 2022 at 22:47:24 UTC, Walter Bright wrote:
> On 2/14/2022 5:15 AM, Paul Backus wrote:
>> Huh? My understanding is that modulo compiler bugs and 
>> incorrect use of @trusted, @safe code should be 100% memory 
>> safe, even without @live.
>> What adding an ownership/borrowing system does (or should do) 
>> is, like DIP 1000, make it possible to do things in @safe code 
>> that previously required @system/@trusted--in this case, 
>> things like manually freeing memory.
>
> Without @live, one cannot be protected against things like 
> double frees.

If you're writing @safe code you're already protected from double 
frees because you're not allowed to manually free memory at all, 
never mind doing it twice. :)


More information about the Digitalmars-d mailing list