On 4/23/2017 5:04 AM, Guillaume Piolat wrote:
The rules of leak-free, exception-safe C++11 aren't so hard.
- single-owneship for everything, invent fake owner if needed
- std::unique_ptr for owning pointer, raw pointers for borrowed
  (unique_ptr neatly avoids to write a RAII wrapper for everything)

When teams internalize these rules, no more leaks, no more double-free, etc.
Hence Rust that sanctified this style.

The trouble is, one cannot look at a piece of code and tell if it follows the rules or not.

I.e. it's not about it being possible to write memory safe code in C or C++ (it is), it's about verifying an arbitrary piece of code as being memory safe.
  • Re: "Competitiv... Joseph Rushton Wakeling via Digitalmars-d-announce
  • Re: "Competitiv... Jonathan M Davis via Digitalmars-d-announce
  • Re: "Competitiv... Guillaume Piolat via Digitalmars-d-announce
    • Re: "Compe... Walter Bright via Digitalmars-d-announce
      • Re: "C... Guillaume Piolat via Digitalmars-d-announce
        • Re: &qu... Guillaume Piolat via Digitalmars-d-announce
          • Re:... Atila Neves via Digitalmars-d-announce
        • Re: &qu... Walter Bright via Digitalmars-d-announce
          • Re:... Ola Fosheim Grøstad via Digitalmars-d-announce
            • ... Timon Gehr via Digitalmars-d-announce
              • ... Ola Fosheim Grøstad via Digitalmars-d-announce
              • ... Nick Sabalausky (Abscissa) via Digitalmars-d-announce
              • ... Timon Gehr via Digitalmars-d-announce
  • Re: "Competitiv... XavierAP via Digitalmars-d-announce
    • Re: "Compe... Atila Neves via Digitalmars-d-announce
      • Re: "C... Nick Sabalausky (Abscissa) via Digitalmars-d-announce
        • Re: &qu... H. S. Teoh via Digitalmars-d-announce
        • Re: &qu... Ali Çehreli via Digitalmars-d-announce

Reply via email to