Direction for @safe/-dip1000

12345swordy alexanderheistermann at gmail.com
Thu Feb 17 16:55:55 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.

How? @live is attached to the function and not the type itself, 
which I never understand why you made that design decision.


-Alex


More information about the Digitalmars-d mailing list