5 ms·
The problem is Rust's marketing. They sell the language too well for use cases that don't need the same degree of safety or speed, and Java (or Go, or C#) would
by dehrmann 2y ago
The problem is Rust's marketing. They sell the language too well for use cases that don't need the same degree of safety or speed, and Java (or Go, or C#) would be the more pragmatic choice.
If you find yourself writing an OS or browser, Rust is a great choice. Basically anything where C++ is the alternative.
- Fire-Dragon-DoL 2y agoI have a vague hunch where Rust is chosen because of the good quality abstraction the language support that's missing from modern languages. I keep joking about it, but immutability is si valuable for general software development. None of the mainstream languages support that, but Rust achieves the same benefits (even if in a different way). Then the Rust type system is sound while modern languages are still dealing with problematic nulls and lack of advanced types (like what's possible with typescript)
- jvanderbot 2y ago100%. My fear is that the backlash spreads the way the hype did (about rust being best for everything) did, and suddenly rust is the choice for nothing. My experiences are very positive, but I work mostly in the narrow-ish cases that Rust is designed for, in C, C++, systems areas.
- palata 2y ago> My deepest fear is that the backlash spreads the way the hype did (about rust being best for everything) did, and suddenly rust is the choice for nothing. I could totally imagine its popularity going down in places where garbage-collected languages are fine, but... don't you think it has a future in those places where C/C++ are needed (e.g. systems areas, as you mentioned). For Rust to lose everywhere would require C++ to win against Rust. Not sure if that's possible.
- jvanderbot 2y agoI think the dip will be deeper than people anticipate. Back to very niche cases. The fact that Linux & Windows is pulling more and more Rust (albeit cautiously), I think secures its future as a C/C++ augmentation for systemsy stuff. The big C/C++ domains haven't really adopted it like I'd hope they would before that dip: Automotive, Aerospace, Robotics, Desktop, Embedded. It's quite perfect for some of those, but they're fighting incumbents without an eccosystem to back them so that will take a long time. It's not like rewriting sudo or ls, you have to rewrite everything to move from a C RTOS to something like a Rust embedded HAL.
- shrimp_emoji 2y agoI mean dawg Rust doesn't even have a standard yet. C and C++ (and Ada! any memory safety fans remember Ada??) have ISO-certified standards.
- analognoise 2y agoAda has a full formally specified language, methodology and tooling, too: SPARK https://www.adacore.com/about-spark https://www.adacore.com/about-spark I've always wondered why Ada didn't get more interest.
- ArtixFox 2y agopeople are not building things with it. The more you build the more popular it gets.
- orwin 2y agoI know more people who currently build things with Ada than I know people who currently build thing with C (professionally, because almost every Ada dev I know have at least an arduino). Probably that says more about the people I know than about the language if I'm honest.
- ArtixFox 2y ago
- stouset 2y agoGarbage collection isn’t the only advantage. Straight up program correctness is drastically improved thanks to sum types, enumeration, and other features of Rust. These do come with some upfront cost. Having used Rust for years, I think these costs tend to be overblown. They disproportionately impact newcomers (which in and of itself is a problem!) and particularly those who don’t care about learning to write new languages idiomatically. Still, though, it’s usually at least a little slower to go from zero to fully functional. However in my experience Rust programs require far less ongoing maintenance which is where the vast majority of time in software is spent. New features tend to be added more easily and entire categories of bugs (more than just memory safety) are completely prevented by the type system. Even large refactors are usually relatively easy and once it compiles, it probably passes the tests too. In some cases every additional day you’re late to launch is disastrous. But when it’s not, the time savings you get from not chasing down runtime errors, nil dereferences, unhandled exceptions, issues stemming from new and partially-handled enum variants, etc. end up recouping the upfront costs tenfold. The upfront costs do make Rust less competitive in areas that have quickly-changing requirements. And that’s totally reasonable, no language is perfect at everything. But the further you get away from sales-driven users and the closer you get toward slower-moving core infrastructure, the more the reduced maintenance costs start paying off.
- palata 2y agoTo which languages are you comparing Rust in that regard? Swift? Kotlin? Go?
- Aldo_MX 2y ago> For Rust to lose everywhere would require C++ to win against Rust. Not sure if that's possible. Or a new C-like language, like Zig.
- deepsun 2y agoExactly. So was Go in it's time. Their marketing sounded like everyone else did garbage collection wrong, and that their approach is best for all use cases and niches.