5 ms·
Everything is a dream, when coming from C++ land. I'm still incredibly salty about how packages are managed in Rust, compared to golang or even PHP (composer).
by krick 2y ago
Everything is a dream, when coming from C++ land. I'm still incredibly salty about how packages are managed in Rust, compared to golang or even PHP (composer). crates.io looks fine today, because Rust is still relatively unpopular, but 1 common namespace for all packages encourages name squatting, so in some years it will be a dumpster worse than pypi, I guarantee you that. Doing that in a brand-new package manager was incredibly stupid. It really came late to the market, only golang's modules are newer IIRC (which are really great). Yet it repeats all the same old mistakes.
- Imustaskforhelp 2y agoIn my opinion , I like golang's way better because then you have to be thoughtful about your dependencies and it also prevents any drama (like rust foundation cargo drama) (ahem) (if you are having a language that is so polarizing , it would be hard to find a job in that ) I truly like rust as a performance language but I would rather like real tangible results (admittedly slow is okay) than imagination within the rust / performance land. I don't want to learn rust to feel like I am doing something "good" / "learning" where I can learn golang at a way way faster rate and do the stuff that I like for which I am learning programming. Also just because you haven't learned rust doesn't make you inferior to anybody. You should learn because you want to think differently , try different things. Not for performance. Performance is fickle minded. Like I was seeing a native benchmark of rust and zig (rust won) and then I was seeing benchmark of deno and bun (bun won) (bun is written in zig and deno in bun) The reason I suppose is that deno doesn't use actix and non actix servers are rather slower than even zig. It's weird .
- deleted 2y ago[deleted]
- jvanderbot 2y agoThere are some influential fair comparisons of compiled languages, but for the most part my feeling is that people are moving from an extremely high level language like Python or JS, and then going to Rust to get performance, when any single compiled language would be fine, and for 90% of them, Go would have been the right choice (on backend or web-enabled systems apps), there was just a hurdle to get to most other compiled languages. It's just Rust is somehow more accessible to them? Maybe it's that pointers and memory just was an inaccessible / overburdensom transition?
- bombela 2y agoNot sure how much it weighs on the balance in those types of decisions. But Rust has safe concurrency. That's probably quite a big boost of web server quality if anything else.
- jvanderbot 2y agoGo's concurrency is unsafe? Rust's concurrency is automatically safe? I am not saying you're wrong, I just don't find it any better than C++ concurrent code, you just have many different lock types that correspond to the borrow-checker's expectations, vs C++'s primitives / lock types. Channels are nicer, but that's doable easily in C++ and native to Go.
- School-Cotton 2y ago> Go's concurrency is unsafe? Rust's concurrency is automatically safe? Yes and yes... Rust statically enforces that you don't have data races, i.e. it's not possible in Rust (without unsafe hacks) to forget to guard access to something with a mutex. In every other language this is enforced with code comments and programmer memory.
- pjmlp 2y agoAs long as that something is in the process's own memory.
- School-Cotton 2y agoCorrect, rust doesn’t magically prevent all bugs. It just makes a large class of bugs harder to write.
- consteval 2y ago.. but most concurrency is done in distributed systems, where Rust provides little to no protection. Although making a Rust monolith would be great!
- joshmarinacci 2y agoProgress. It doesn’t have to be the best. It just has to be better than C++.
- guitarbill 2y agoI don't really understand this argument, and it isn't the first time I've heard it. What problem other than name squatting does it solve? How does a Java style com.foo.bar or Golang style URL help e.g. mitigate supply chain attacks? For Golang, if you search pkg.go.dev for "jwt" there's 8 packages named that. I'm not sure how they are sorted; it doesn't seem to be by import count. Yes, you can see the URL directly, but crates.io also shows the maintainers. Is "github.com/golang-jwt/jwt/v5" "better" than "golang.org/x/oauth2/jwt"? Hard to say at a glance. On the flip side, there have been several instances where Cargo packages were started by an individual, but later moved to a team or adopted. The GitHub project may be transferred, but the name stays the same. This generally seems good. I honestly can't quite see what the issue is, but I have been wrong many a time before.
- Thaxll 2y agoGo has more protections than Rust regarding supply chain attack. https://go.dev/blog/supply-chain https://go.dev/blog/supply-chain