On Saturday, 15 April 2023 at 14:10:57 UTC, Dennis wrote:
This adds complexity, just to add some 'intermediate' safety between `@system` and `@safe` in a few cases. It's better to keep the rules simple and consistent.

To quote my past self:


There used to be different rules for lifetime errors in all of these:
- explicit `@system` functions
- `@system` by default functions (yes, [they were special](https://issues.dlang.org/show_bug.cgi?id=19873))
- inferred functions
- `@safe` functions
- `@trusted` functions

It was really complex and confusing, and I've worked on simplifying it such that all lifetime errors are safety violations like any other. The only exception is directly returning a dangling pointer to a stack variable, which is just an error even in @system code ([issue 19873](https://issues.dlang.org/show_bug.cgi?id=19873)). I don't want to go back to more special cases, especially with the dip1000 by default transition which is complex enough as is.

https://forum.dlang.org/post/nzotevvzvbpqscfxs...@forum.dlang.org

  • Re: Returning a ... kdevel via Digitalmars-d-learn
    • Re: Returni... Bastiaan Veelo via Digitalmars-d-learn
      • Re: Ret... kdevel via Digitalmars-d-learn
        • Re:... Dennis via Digitalmars-d-learn
          • ... kdevel via Digitalmars-d-learn
            • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
            • ... kdevel via Digitalmars-d-learn
            • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
            • ... kdevel via Digitalmars-d-learn
            • ... Dennis via Digitalmars-d-learn
            • ... Dennis via Digitalmars-d-learn
            • ... kdevel via Digitalmars-d-learn
            • ... Dennis via Digitalmars-d-learn
            • ... kdevel via Digitalmars-d-learn
            • ... Dennis via Digitalmars-d-learn

Reply via email to