On Tuesday, 22 September 2015 at 03:59:31 UTC, Ola Fosheim Grostad wrote:
On Tuesday, 22 September 2015 at 02:15:51 UTC, jmh530 wrote:
Interesting. Not to resurrect the older D vs. Rust thread, but I have heard it that it can be painful to do some things in Rust. D often has the ability to do unsafe things, like disable the GC. I was looking at how Rust has raw pointers and smart pointers. I'm curious as to what it is missing that is making things more difficult for people. If you or anyone has any idea.

My knowledge of Rust is only cursory, but if you want to graphs (like a doubly linked list) you have to use a different pointer type. Just like in c++ where you have to use shared_ptr (+ weak_ptr or raw pointers) and not unique_ptr. You sometimes also have to explicitly state relationships between lifetimes (that one object outlives another).

But that's very annoying to work with and more pain than gain.

In my initial post I was thinking of a runtime solution where the object knows it's own life cycle, or at least knows when its own death is nigh and destroys itself. I don't know if this is possible at all, I simply borrowed this idea from biology. We don't have GC in our bodies, cells know when it's time for them to go.
      • 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