• Ben Matthews@sopuli.xyz
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Seems to me Rust is overhyped - sure it’s better than C, it can power WASM, Lemmy is written in it, borrow-checking is neat, etc., but it’s got a long long way to go to gain the high-level features of Scala. Problem is that hype is important to grow a community, and as LiHaoyi wrote, that peaked for Scala some years ago. I’d like to see more progress on Scala Native, to enable moving stuff between wasm and scala.js.

    • azthec@feddit.nlOP
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Iam curious what features do you find missing in rust that the scala ecosystem has? Is it FP specific systems like cats? I know I’ve already seen what seemed like a decent actor system

      • Ben Matthews@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        No, as it happens I think pure-functional is over-hyped too, except for specific massively parallel tasks. I’m not an expert on any programming ecosystem, I’m a climate scientist who codes a complex future-scenarios model and like the multi-paradigm nature of scala, with a lot working out of the box, without many dependencies. Scala’s sophisticated type system catches most errors, so I don’t have to run loads of tests like the python people do, yet with Scala3 syntax it’s even more readable than python, and just works in the browser through scala.js (it helps js and scala share a lot of concepts). It’s a pity we have cycles initial hype - disappointment - slow but steady fixing - then obscurity so just when everything starts to works well, people move away to next hype.

        I note the lemmy devs are working on converting their gui from react to rust too - let’s see if this works out - but maybe it’s too low-level a language for this.

        • silasmariner@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          A propos, I actually find that the biggest win of FP is somewhat orthogonal to it, and that’s immutability. This leads to the ability to reason locally about code which is IMO completely invaluable even outside of parallelism scenarios. When you don’t know if a method might be mutating a parameter without actually reading all the way down it’s a real PITA 😅 (I have been doing a lot of refactoring of a large codebase recently and this has been a serious issue)

          • azthec@feddit.nlOP
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            For sure, this has been something I learned from working in Scala that has made my code in other projects much more readable and easier to reason about. For performance reasons I may need to use mutables, but often I can keep it in the context of the function and just encapsulate it.

          • Ben Matthews@sopuli.xyz
            link
            fedilink
            arrow-up
            1
            ·
            11 months ago

            I don’t do pure FP, but do value the scala concept to write immutable by default unless there’s a good reason not to (usually efficiency, inner-loop stuff). While refactoring old code (most was originally java) I gradually convert vars to vals, but the old mutable code still works too, it’s multi-paradigm. What matters most for reasoning is readability, scala3 really helps with this.