• porous_grey_matter@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    13 days ago

    Yes, I love rust and use it regularly, but it is suitable for totally different use cases than python. Have you worked on a python project using strict type checking enforced in CI? It really isn’t so bad.

    • fuck_u_spez_in_particular@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      13 days ago

      I haven’t, but everytime I try python I want to quit it so quickly because of the messed up packaging system and more importantly IDE experience (and I don’t think unless you are extremely disciplined with type annotations, that you’re getting even close to rust-analyzers performance). I enjoy just exploring dependencies with go to definition, and the trust I can have in the type system.

      I’m swearing everyday in my job about typescript, which is just javascript with leaky and unnecessary complex type annotations. So yeah I even consider typescript bad (and I doubt that python is better with type-checking).

      • porous_grey_matter@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        13 days ago

        In my experience which is pretty extensive with python but only moderate with typescript I’d say it’s probably better, easier to work with and offers a similar level of flexibility.

        Not sure what you mean by performance but it’s easy to be disciplined when you can’t commit something that isn’t fully annotated. I feel like I can trust it fairly well, except for rare occasions where external library code is wrongly annotated and I have to put some ugly shim in.

        Afaik you can just go to definition in literally any language, typing or no.

        I’m in total agreement about the packaging though, it sucks.

        • fuck_u_spez_in_particular@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          13 days ago

          performance

          Like raw runtime performance, if I write the code in python, it’s ~ 100x slower than in Rust. You often get away with dumber stuff in Rust as the compiler is able to optimize it well. With python you would have to write your native bindings either in Rust/C or C++. So why not straight use Rust (as the other choices aren’t sa(f/n)e at this point anymore).

          Afaik you can just go to definition in literally any language, typing or no.

          No you can’t, at least not in the same way that a static type-system allows. As dynamically-typed programs are evaluated on runtime, so you often don’t know at the time while coding what is run. In untyped/dynamically typed languages you often use heuristics to jump into stuff, which is just less precise.

          There’s more to this, but I think you get what I mean, when you programmed more intensively with static generics in Rust (compared to something similar in say javascript or python without types), IDE experience is just more precise and correct (and more fun).