• r00ty@kbin.life
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    The problem with rust, I always find is that when you’re from the previous coding generation like myself. Where I grew up on 8 bit machines with basic and assembly language that you could actually use moving into OO languages… I find that with rust, I’m always trying to shove a round block in a square hole.

    When I look at other projects done originally in rust, I think they’re using a different design paradigm.

    Not to say, what I make doesn’t work and isn’t still fast and mostly efficient (mostly…). But one example is, because I’m used to working with references and shoving them in different storage. Everything ends up surrounded by Rc<xxx> or Rc<RefCell<xxx>> and accessed with blah.as_ptr().borrow().x etc.

    Nothing wrong with that, but the code (to me at least) feels messy in comparison to say C# which is where I do most of my day job work these days. But since I see often that things are done very different in rust projects I see online, I feel like to really get on with the language I need a design paradigm shift somewhere.

    I do still persist with rust because I think it’s way more portable than other languages. By that I mean it will make executable files for linux and windows with the same code that really only needs the standard libraries installed on the machine. So when I think of writing a project I want to work on multi platforms, I’m generally looking at rust first these days.

    I just realised this is programmerhumor. Sorry, not a very funny comment. Unless you’re a rust developer and laughing at my plight of trying to make rust work for me.

  • fmstrat@lemmy.nowsci.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Fun story from before Rust was getting popular (years ago). So, I did a performance comparison to determine what language we should write our rules engine in. I compared Go, Rust, Node, and some others not worth mentioning.

    At the time, I had experience with all but Rust.

    Even knowing nothing, and working from scratch, the Rust POC was significantly faster. Just way, way, better.

    That being said, I still chose Go due to productivity based on the language knowledge of the team to ease the transition (Go was closer to what they knew already), and while it was good for them to learn Go, I look back on it and realize Rust would have been a great opportunity to invest in their careers and have them learn it instead.

    A hindsight is 20/20 experience for me.

  • Ashelyn@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Is that because it’s that simple, or just that the boilerplate is pre-written in the standard library (or whatever it’s called in rust)?

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Yeah, I came to Rust from Scala and Kotlin, where equality is default-implemented (for case class and data class respectively, which is basically all we ever used), so this meme surprised me a bit.

      I do actually like that you can decide a type cannot be compared, because sometimes it really just doesn’t make sense. How would you compare two HTTP clients, for example? But yeah, it certainly is a choice one can disagree with.