4 ms·
There are already at least two Rust compilers, now that there's a GCC version. That's good; it means the language becomes stronger than the implementation. Rig
by Animats 4y ago
There are already at least two Rust compilers, now that there's a GCC version. That's good; it means the language becomes stronger than the implementation.
Right now, the weak points are mostly library side. Too many 0.x version crates where the API is still in flux.
- dgb23 4y agoIt seems in terms of web dev related crates, admittedly a niche for Rust, there have been quite a bunch of abandoned, unfinished projects and other stability issues. There also seems to be a general trend towards sophistication and away from simplicity. That’s a tradeoff that makes me personally wary, rather than excited at this point in my life. Much of that is to be expected, given the age and the unique value props of the language. But the stability to hype ratio seems unattractive overall, even though the language and tooling are great to a large extent.
- mr_00ff00 4y agoIn fairness, I don’t think rust in web dev makes any sense outside of personal hobby projects. I’m not surprised there’s lots of abandoned and unfinished projects there. That’s not an important area.
- satvikpendem 4y agoFor backend APIs it absolutely makes sense, not only for the safety guarantees but also its type system which makes data flows much easier to reason about. I recommend the book Zero To Production in Rust in particular for learning about this, I finished it recently and at the end I had a production-ready backend API. https://zero2prod.com https://zero2prod.com
- mr_00ff00 4y agoRust isn’t as safe as GCed language and you don’t need systems level speed on a backend API. Rust’s safety is better than C/C++, but memory vulnerabilities are found in cargo packages because of unsafe code.
- satvikpendem 4y ago> you don’t need systems level speed on a backend API. I do, actually. > but memory vulnerabilities are found in cargo packages because of unsafe code. Forbid unsafe in your config and you're good.
- mr_00ff00 4y agoCorrect me if I am around, but Forbid unsafe does not include dependencies, which can and do have unsafe rust.
- satvikpendem 4y agoYou can use cargo-geiger to check whether dependencies have unsafe code too, along with your own code.
- Dylan16807 4y ago> Rust isn’t as safe as GCed language Safe rust should be. And C# is a notable example of a GCed language that also has 'unsafe'. Along with most of the GCed languages with FFIs.
- mr_00ff00 4y agoSafe rust can still use crates with unsafe rust, so no. Unless it’s safe rust and uses no outside code or none of its dependency tree has unsafe rust. It’s pretty crazy how many people will argue this point and downvote comments about it. It’s like a C++ dev claiming they never write memory bugs. I love rust, but the community pretending like memory safety bugs are impossible is as annoying as people claiming memory safety isn’t important. EDIT: And GC languages “can” call unsafe is not the same as a language that has unsafe in it. It’s laughable if you are claiming there are the same memory bugs in say Elixir as there are in Rust.
- Dylan16807 4y ago> Unless it’s safe rust and uses no outside code or none of its dependency tree has unsafe rust. If you already know what you want, why pretend there is no solution? But you skipped the other half of the post, where I explained that the average GCed language either has unsafe code or can easily call unsafe code or both, just like Rust.
- dgb23 4y agoThis is a good book. Very hands on and goes all the way.