On Monday, 21 September 2015 at 11:01:27 UTC, ZombineDev wrote:


There's also a simple thing called smart pointers which do this with RAII, copy and move semantics. Smart pointers manage the lifetime of the object they point to automatically. You just need to make sure that you access the object only through the smart pointer, because if you get another reference (through other means) that the smart pointer doesn't know about, the smart pointer may free the object too early.

My understanding is that the key benefit of Rust's system is that compile time checks don't have the runtime costs of smart pointers.
    • Re: Go 1.5 Rory McGuire via Digitalmars-d-announce
    • Re: Go 1.5 Ola Fosheim Grøstad via Digitalmars-d-announce
  • Re: Go 1.5 Chris via Digitalmars-d-announce
    • Re: Go 1.5 Ola Fosheim Grøstad via Digitalmars-d-announce
      • Re: Go 1.5 Chris via Digitalmars-d-announce
        • Re: Go 1.5 Ola Fosheim Grøstad via Digitalmars-d-announce
        • Re: Go 1.5 ZombineDev via Digitalmars-d-announce
          • Re: Go 1.... Ola Fosheim Grøstad via Digitalmars-d-announce
            • Re: ... Chris via Digitalmars-d-announce
              • ... Ola Fosheim Grøstad via Digitalmars-d-announce
          • Re: Go 1.... jmh530 via Digitalmars-d-announce
            • Re: ... Ola Fosheim Grøstad via Digitalmars-d-announce
              • ... jmh530 via Digitalmars-d-announce
              • ... Ola Fosheim Grostad via Digitalmars-d-announce
              • ... Chris via Digitalmars-d-announce
              • ... Ola Fosheim Grøstad via Digitalmars-d-announce
              • ... Johannes Pfau via Digitalmars-d-announce
  • Re: Go 1.5 Martin Nowak via Digitalmars-d-announce
    • Re: Go 1.5 Ola Fosheim Grøstad via Digitalmars-d-announce
      • Re: Go 1.5 Martin Nowak via Digitalmars-d-announce
        • Re: Go 1.5 Ola Fosheim Grøstad via Digitalmars-d-announce

Reply via email to