On Tuesday, 23 July 2019 at 19:15:44 UTC, Olivier FAURE wrote:
That's as good a time as any to plug my own proposal draft:

https://gist.github.com/PoignardAzur/9896ddb17b9f6d6f3d0fa5e6fe1a7088

Any thoughts?

So in a nutshell, a variable with the unique qualifier ensures that there are no other references to that data during the lifetime of said variable? In other words, you can only take 1 addressOf/ref at a time?

Does it prevent more that just use-after-free?

Random idea: what about an @owned destructor? One that only runs on the original object, not on any of its copies. Which implies scope of course, so that nothing of the copies or its internals are allowed to escape.
          • Re:... Timon Gehr via Digitalmars-d-announce
          • Re:... Olivier FAURE via Digitalmars-d-announce
      • Re: Ownersh... Sebastiaan Koppe via Digitalmars-d-announce
        • Re: Own... Walter Bright via Digitalmars-d-announce
          • Re:... Sebastiaan Koppe via Digitalmars-d-announce
            • ... Walter Bright via Digitalmars-d-announce
              • ... Timon Gehr via Digitalmars-d-announce
              • ... Sebastiaan Koppe via Digitalmars-d-announce
              • ... Timon Gehr via Digitalmars-d-announce
              • ... Olivier FAURE via Digitalmars-d-announce
              • ... Sebastiaan Koppe via Digitalmars-d-announce
              • ... Olivier FAURE via Digitalmars-d-announce
          • Re:... Per Nordlöw via Digitalmars-d-announce
            • ... Max Haughton via Digitalmars-d-announce
          • Re:... 12345swordy via Digitalmars-d-announce
  • Re: Ownership and Bo... rikki cattermole via Digitalmars-d-announce
  • Re: Ownership and Bo... Walter Bright via Digitalmars-d-announce
  • Re: Ownership and Bo... Walter Bright via Digitalmars-d-announce
  • Re: Ownership and Bo... Olivier FAURE via Digitalmars-d-announce
  • Re: Ownership and Bo... Nick Sabalausky (Abscissa) via Digitalmars-d-announce

Reply via email to