• Urist@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    6 months ago

    Seems one of the main reasons is to use Rust’s thread safety to enable “concurrent mode”. Anyone with the knowledge able to explain what advantages that would yield for an end fish user?

  • Tb0n3@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    6 months ago

    These rewrites in rust are merely just training exercises for those doing it. It wasn’t needed and in most cases isnt used.

    • Deebster@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Large parts of the rewrite came from contributors who had never worked on fish before.

      That’s pretty useful alone.

      And there’s this:

      Thread Safety

      Allowing background functions and concurrent functions has been a goal for many years. I have been nursing a long-lived branch which allows full threaded execution. But though the changes are small, I have been reluctant to propose them, because they will make reasoning about the shell internals too complex: it is difficult in C++ to check and enforce what crosses thread boundaries.

      This is Rust’s bread and butter: we will encode thread requirements into our types, making it explicit and compiler-checked, via Send and Sync. Rust will allow turning on concurrent mode in a safe way, with a manageable increase in complexity, finally enabling this feature.

    • anteaters@feddit.de
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      Angry downvotes because people don’t like to hear that a meme language is a meme language.

      • acwern@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        6 months ago

        Probably not “angry” downvotes. OP provided a link where it’s explained exactly why the switch was made. Even if you don’t care for Rust it’s pretty clear that this was done with more purpose than just “Ooo let’s make it in Rust for fun”

        • Ephera@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          6 months ago

          And even if it was for fun, that would still be valid. The project is run by volunteers. If they don’t have fun, they stop doing it.