On 5/21/2020 8:36 PM, Paul Backus wrote:
Something ought to be done to prevent this. It doesn't have to be the exact
proposal from the discussion thread, but doing nothing and allowing widespread
silent breakage cannot possibly be the best solution.

I can see that happening. A simple example would be:

    extern (C) void free(void* p);
    ...
    free(p);
    free(p);

The thing is, you are no worse off than now. If free() can be misused by calling it from system code, it can be misused by calling it from safe code.

There's no way the compiler can detect this. If you annotate it, you'll just have to annotate it correctly. Forcing an annotation just means slapping @safe: at the beginning of the file and moving on - it's not going to help.
  • Re: DIP 1028--Make @saf... Johannes Loher via Digitalmars-d-announce
  • DIP1028 - Rationale for... Walter Bright via Digitalmars-d-announce
    • Re: DIP1028 - Rati... Paul Backus via Digitalmars-d-announce
      • Re: DIP1028 - ... Walter Bright via Digitalmars-d-announce
        • Re: DIP102... Dukc via Digitalmars-d-announce
          • Re: DI... Steven Schveighoffer via Digitalmars-d-announce
            • R... jmh530 via Digitalmars-d-announce
              • ... Adam D. Ruppe via Digitalmars-d-announce
              • ... Timon Gehr via Digitalmars-d-announce
              • ... Walter Bright via Digitalmars-d-announce
              • ... Steven Schveighoffer via Digitalmars-d-announce
              • ... jmh530 via Digitalmars-d-announce
              • ... Steven Schveighoffer via Digitalmars-d-announce
              • ... jmh530 via Digitalmars-d-announce

Reply via email to