• porous_grey_matter@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    28 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
      28 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).