• thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    0
    ·
    28 days ago

    And the Garbage Collector in Go is also a thing that helps ton for most normal work. To be honest, I wish sometimes Rust had an optional GC mode (I know this would be against the principles of the language… don’t take this wish too seriously). I see it like C with a GC+Concurrency. And one should not forget, because the language is dead simple, the compiler compiles extremely fast; even suitable as an interpreter language basically (purely judging by speed metrics).

    But after being exposed to Rust, I do not have fun with Go because it misses some really cool or basic functionality; like proper error handling. Ultimately these are different approaches and that’s good. In example functional programming works a bit differently and we are not saying they should give up on this approach, because you like C so much.

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      28 days ago

      To be honest, I wish sometimes Rust had an optional GC mode (I know this would be against the principles of the language… don’t take this wish too seriously).

      If you just need the occasional cop-out, you can wrap a value in an Rc or an Arc. They do reference-counting, which is almost like garbage collection (reference counting can’t resolve cycles between references).