Direction for @safe/-dip1000
Paul Backus
snarwin at gmail.com
Mon Feb 14 13:15:26 UTC 2022
On Monday, 14 February 2022 at 08:39:58 UTC, Walter Bright wrote:
> On 2/13/2022 3:15 AM, Florian Weimer wrote:
>> I've tried to figure out where this is heading. Is the
>> eventual goal (irrespective of mechanism) that sticking
>> `@safe` onto the `main` function will ensure memory safety for
>> the whole program?
>
> Yes, although @safe does not supply complete memory safety. The
> addition of @live fills in much of the rest.
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.
More information about the Digitalmars-d
mailing list