@Centril
Can you explain the motivation why you want to turn Rust into a very different language in regards to error handling? What is the actual problem this very aggressive change to the language tries to solve? Because I still didn’t see any motivation explanation besides somewhat hand-wavy „ergonomics“. And I’d like to point out that while I’ve seen many different things mentioned as the design goals of Rust, ergonomics was never one of these. On the syntax level, this seems like a much bigger change than async-await which arguably does have a motivation.
The approach to error handling „Nothing to see here, just an ordinary enum, like any other“ is kind of nice, because it is minimal congnitively. If I want to understand try fn with auto-wrapping, there several more layers to keep track of what happens. It makes the gaps between what I want to do, what is written and what actually happens larger (even if I don’t count the fact that the old syntax has to stay). But the bigger problem with the proposal is how different it is from what we have now.
The current users of Rust are using it because they like how it feels and how it works for them. Sure, some things can be improved a bit, but if they wanted a completely different language, they would not be using Rust in the first place. It feels a bit de-motivating to see proposals for „Oh, we’re turning Rust into something completely else. If you liked the old one, bad luck for you.“ and basically trading one set of users for different one. And I speak about individual people (me at last), I don’t even want to think how I’d go about trying to persuade my boss to use Rust in the next project if such a big changes land regularly. Sure, I’d still be able to compile the old code, but it would no longer be idiomatic, would spill bunch of warnings at me… I believe if Rust is to be called „stable“, it doesn’t mean only that the old code will compile (that is important), but also that if I take a break from using it for a year, I’ll not be starting from scratch later on. One of the big selling point of good old C is that it’s just that ‒ there were no big changes over the last 30 years.
To state in other words how strong aversion to this change I personally feel: over the many years of coding, I’ve taken programming languages as mere tools and none of them felt like a good one. I even thought about trying to design my own language and the only thing stopping me was the idea how big task it is. When I started to use Rust I finally felt like I found one that I like, that it’s a good match for my needs and likes. That it is something more than just a tool. Introducing this complicated, sometimes surprising syntax to pretend Result is something special while in fact it is value like anything else would turn the whole language into another mere tool and I’d have to continue searching. Sure, from the global point of the language, I’m just one person. But seeing how strongly some people (and it feels like about half of the people here) oppose it, I don’t think I’m completely alone.