Since 1.0 Rust has improved a lot while maintaining compatibility, even through a big deprecation step like the 2018 edition.
A good chunk of those improvements are about making Rust more usable and more forgiving. Some were things I didn't initially recognise as usability problems, but what came out the other side was absolutely better – the modules changes are a good example.
Rust's lead contributors have been welcoming and humble – while also being human. It can be very frustrating running an open source project, and Rust is trying very hard to be open and inclusive, which increases the challenge.
When writing Rust, there are definitely paths of least resistance. You often read about the moment people realise they're going "against the grain", and discovering why it's safar and/or faster to do it "the Rust way". But that's not subjugation. It's about understanding your tools, how they work, and what they're for.
I don't really get where you're coming from here, especially with regards to this issue -- it seems like almost everyone, including Rust core team members, agree that `impl Iterator for Range` was an API design mistake, that came out of (IIRC) Iterator existing prior to IntoIterator in the pre-1.0 days. This seems to me to just be an unfixable design flaw due to backwards-compatibility rules, not something that really speaks to the design of the language as a whole.
This sounds like something that could be solved in the next edition.
I don't know why you feel that way. Any major language or standard library change goes through an RFC process, where anyone in the community can submit feedback, and from what I have seen, the official teams are very responsive to concerns.
- The big one is that, at least what I see from my admittedly flawed perspective, there appears to be an active annoyance by a significant number of participants on the various issues on the importance of maintaining library ergonomics under constrained execution environments, with bare metal / free-standing environments being an obvious scenario. An example that comes to mind being stuff dealing with situations where 'global allocation' is actively harmful, which, in addition to happening in kernel development, also happens when building managed runtimes.
- What comes across as an almost begrudging foreign-function interface, no ABI commitments, and lack of clarity about what is undefined behaviour under the `unsafe` operation needed to engage in any of this
- Cargo VS rustc and integration into other build systems. Sanctioned VS unsanctioned paths more generally.
- Prominent people in the community making comments about actively suppressing individual stylistic preferences because it's better for the collective
The rest of the issues you mentioned are being actively worked on or investigated. Yes Rust 1.0 didn't solve all problems out of the gate and even now there's a lot of work still to do. But a lot of progress has been made and is being made.
I get that if you don't follow issues, working groups, zulip chats, etc that it may not be obvious what is and isn't being worked on but I'm really not sure where you're getting this "arrogance" from.
I would argue that this is because there are differences in the severity of the tooling. gofmt for example will not override your decisions regarding line breaks last time I checked, while rustfmt will not afford you any freedoms there.
My understanding is that this is being worked on. Of course any language (or really any project) will have people annoyed that the maintainers priorities don't align perfectly with their priorities.
> What comes across as an almost begrudging foreign-function interface,
I haven't gotten any impression that FFI is begrudging. It really seems like a first class citizen to me, and is certainly better than the FFI story in say, java or go. Rust even has language features that exist just for FFI, such as unions and c-style variadic arguments.
> no ABI commitments
This is a recognized problem. It is also a hard problem, since lifetimes don't exist after compile time. But using the C-ABI is quite usable in some cases. And there have been a few RFCs around this recently (specifically around stable ABIs for vtables).
> lack of clarity about what is undefined behaviour under the `unsafe` operation needed to engage in any of this
This is again a known problem, and something that is improving.
> Cargo VS rustc and integration into other build systems.
I think there was some work being done on this, but I don't know the current status. There are people that use rust with bazel.
Even without introducing a new type, it could be improved in a backwards compatible way. For example, derive the Copy trait, and add a contains method that takes an owned value instead of a reference (at least as long as the Idx type is Copy).
Here is the discussion
> In 2021 edition the compiler team could change the
meaning of (3..5) to resolve to a new type. Then if you wanted
the old type you have to request it by a fully qualified name
or something.
And the responses was: > That would be pretty awful. I think it would be
better to change IntoIterator and warn for differences
in copy and intoiterator in both editions so you can write portable code.I've basically decided to stay in my (ever-improving) comfort zone of C++ until Rust gets named/default arguments, which is my arbitrary litmus test for whether it's going to actually be a usable language for me.
struct OptionsStruct {...}
impl Default for OptionsStruct {...}
impl Add for OptionsStruct {...}
fn port(portnum : u16) -> OptionsStruct {...}
fn timeout(millis: u64) -> OptionsStruct {...}
fn maxconns(conns: usize) -> OptionsStruct {...}
fn main() {
...
// startServer("localhost", default())
startServer("localhost", port(54321) + timeout(1000));
...
}
Not the most ergonomic, I know, and requires custom architecting for each instance of this, but somewhat doable. fn f(n: Option<u8>) -> u8 {
match n {
Some(n0) => n0,
None => 10
}
}
fn main() {
let n1 = f(Some(20));
let n2 = f(None);
println!("{} {}", n1, n2);
}1: https://dave.cheney.net/2014/10/17/functional-options-for-fr...
I normally just leverage a couple of features: Derive(default) to have an "empty" initialized value and the struct field filling syntax
let x = Foo { field_i_care_about, ..Default::default() };Can you point us to where this antipathy was displayed?
I continuously really want to like the language. The premise is good, a lot of the ideas are really compelling, but when it comes down to aspects I disagree with, I get a strong sense of Rust demanding that users subjugate themselves to all the choices and opinions of the architects, and is (are?) hostile to the notion of a user expressing themselves through their tools, and not just their output. As a result, every time I interact with Rust my hackles end up getting raised and so far it would seem that a (currently absent) existential motivator would be required for me to get past it.