• seahorse
    link
    fedilink
    arrow-up
    4
    ·
    3 years ago

    How does Rusts features enable Lemmy development? Why not write it in Go or something similar? I’m a systems programming noob. Just want to know why you chose Rust.

    • ChinaNumberOne
      link
      fedilink
      arrow-up
      7
      ·
      3 years ago

      i can’t speak for the lemmy’s developers but rust is basically the perfect language for backend servers

      • it’s incredibly fast

      • it’s incredibly safe

      • there is clippy, a incredibly powerful tool to detect common mistakes

      • statically linked libraries (bad for normal applications but ideal for servers, it’s why go does it)

      • incredibly powerful pattern matching

      • very safe and easy-to-use generics

      • sanitized macros

      these are just a couple of things that came to mind. for most of rust’s life it was used as a language to create backend servers and dynamically link libraries so it ended up being very good for those things

      • DessalinesA
        link
        fedilink
        arrow-up
        4
        ·
        3 years ago

        This is spot on. I’ll say the two other things that almost every other language has gotten wrong, that makes me never want to use another language again, is errors, and results / optionals.

        Your number one issue in most languages is the dreaded nullpointerexception. Rust doesn’t have them: if a value might be missing or have an error, that is typed as an optional, and you have to deal with that at compile time. I can’t stress enough how well this works.

        @nutomic@lemmy.ml has done massive code refactors, and you can pretty much guarantee that if it compiles, it works.

        Also having a memory safe language is nice, and we never have to worry about balooning memory usage.

  • k_o_t
    link
    fedilink
    arrow-up
    4
    ·
    3 years ago

    article aside, what an absolutely beautiful and minimal website

    i kinda lost faith in the web, but damn, every now and then i stumble upon a website like this, and it makes me happy :)

  • the_tech_beast
    link
    fedilink
    arrow-up
    3
    ·
    3 years ago

    Its not like Rust is going to replace C++, right?

    Will Rust replace C++ in the future?

    • DessalinesA
      link
      fedilink
      arrow-up
      4
      ·
      3 years ago

      I agree with the writer of the article, that it might not be good to rewrite everything in rust, but for new projects, there’s no reason to not use it. There’s a reason its consistently being ranked as developers favorite language year after year.