this post was submitted on 28 Nov 2024
464 points (88.5% liked)

Programmer Humor

32718 readers
235 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 2 points 3 weeks ago (1 children)

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.

[โ€“] [email protected] 1 points 3 weeks ago* (last edited 3 weeks 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).