• Zachariah@lemmy.world
    link
    fedilink
    arrow-up
    45
    ·
    3 days ago

    Blog post: https://fishshell.com/blog/rustport/

    Now that we’ve released the beta of fish 4.0, containing 0% C++ and almost 100% pure Rust, let’s look back to see what we’ve learned, what went well, what could have gone better and what we can do now.

    We’re writing this so others can learn from our experience, but it is our experience and not an exhaustive study. We hope that you’ll be able to follow along even if you have never written any rust, but experience with a roughly C+±shaped language should help.

    • onlinepersona@programming.dev
      link
      fedilink
      English
      arrow-up
      30
      arrow-down
      3
      ·
      3 days ago

      Why are we doing this again?

      We’ve experienced some pain with C++. In short:

      • tools and compiler/platform differences
      • ergonomics and (thread) safety
      • community

      Preach. make install is the biggest source of “works on my machine” ever. (obviously exaggerating). You could point me at 99% of all C++ projects that have dependencies and it ./configure && make install wouldn’t work on any of my machines. “Oh of course you need to install the dependencies, just sudo apt get” let me stop you right there, I don’t have debian. And with that you’re on your own with C/C++ projects.

      Everything else in that chapter plays a big part in my departure from C++. ~30 years of existence and they have barely learned from their missteps.

      We’ve succeeded. This was a gigantic project and we made it. The sheer scale of this is perhaps best expressed in numbers:

      • 1155 files changed, 110247 insertions(+), 88941 deletions(-) (excluding translations)
      • 2604 commits by over 200 authors
      • 498 issues
      • Almost 2 years of work
      • 57K Lines of C++ to 75K Lines of Rust 5 (plus 400 lines of C 6)
      • C++–

      Wow. What an amazing job 👏

      Anti Commercial-AI license

      • sik0fewl
        link
        fedilink
        arrow-up
        4
        ·
        1 day ago

        You could point me at 99% of all C++ projects that have dependencies and it ./configure && make install wouldn’t work on any of my machines.

        That’s why configure takes 100 arguments, so you can tell it where every single dependency is. I don’t miss those days.

      • brisk@aussie.zone
        link
        fedilink
        arrow-up
        14
        ·
        3 days ago

        In case anyone else was wondering what “Rust 5” and “C 6” were, the numbers are footnotes in the blog post.