I don’t need something practical. I just need something fun to keep me motivated.

  • DaPorkchop_@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    3 days ago

    Rust has a lot of cool ideas (I love the borrow checker), but in its current state I don’t think it can replace C++ for the things I’d be interested in using it for. 99% of the time when I reach for a natively compiled language it’s because I need to do some performance-critical loop I can’t reasonably implement in the language my business logic is written in (normally Java), and I end up in a situation where most of Rust’s advantages (and C++'s footguns) aren’t really relevant (lifetimes don’t matter if I’m just writing some SIMD code which reads/writes into externally allocated memory segments). So for my purposes, Rust is mostly just a worse version of C++ in that it’s missing a bunch of features I want (my main gripes already listed above) and has a bunch of cool features that I don’t care about.

    If I were writing an entire program from scratch I’d probably opt for Rust over C++, at least for the bulk of the business logic, but I don’t think Rust has quite achieved its ideal of “zero-cost abstraction” for many performance-critical use cases, and certainly not most of the ones I actually have.

    • ageedizzle@piefed.caOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      Ok thanks. Interesting to hear that. Rust does seem really cool but i someone wonder if I’m just caught up in a hype cycle. So it’s good to hear a well measured critique like this