this post was submitted on 11 Jan 2024
31 points (87.8% liked)
Rust
5981 readers
42 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I completely agree with almost everything you wrote (though from my limited experience of Kotlin it seems much less prone to the types of bugs you're describing than Python and Go). That's why, of the languages I know, I prefer Rust for pretty much every task (except shell scripting, for which I honestly don't like any of the available options).
But I think Boats is right that there's room in the language design space for a language that does make some sacrifices in favor of convenience, while still maintaining most of the correctness benefits of Rust.
Consider the case of
async
: Rust's design was constrained by the need to not have an execution runtime built into the language, and a desire to be able to use async code in embedded environments without an allocator. The result is honestly an engineering marvel, and amazingly ergonomic given those constraints. But it's full of rough edges and tricky corner-cases: on the language user side, execution engines have fractured the ecosystem, and on the implementation side, it's a slow and arduous process to make all the other Rust language features play nicely with async (as evidenced by the fact that we only just recently got support for async in traits, and it's still very limited).Those difficult requirements are not due to Rust's goal of being highly reliable and maintainable; they're due to the separate goal of Rust being usable anywhere C or C++ is usable. So what would a language look like that values maintainability strongly (maybe not quite as strongly as Rust, but nearly so), without being required to work on all embedded platforms or run without a garbage collector?