Ok, thank you for furthering the discussion. You are making some good points.
So the real question is why the downsides of non-locality are fine in cases like RAII or panics or asserts
RAII: I explained my view. Rust is fundamentally a RAII language. It is part of the ownership model and the fundamental way that resources are managed. It is universally expected throughout all Rust code. It is never surprising and always trivial to reason about.
Unlike RAII, which is consistent and expected everywhere, implicit ? makes the semantics inconsistent and confusing.
Panics and asserts: these are intended as a way to catch bugs. They should only happen on catastrophic failure where the most sensible thing to do is abort the program, because a bug has been hit (like some invariant being violated) and it is unclear how the program could proceed from there. They should not occur as part of the normal execution of a program. This justifies their non-locality. They are a way for the program to commit suicide in a controlled way, in situations where there is nothing better that can be done. At least that is the intention; of course these features can be misused in various ways, but that is what conventions are for.
To be perfectly clear: I do think we probably should keep ?. … …
Yeah, I understand you :). It is great to argue for the opposite side from your personal beliefs. It helps consider all sides better and see different arguments.
especially in the face of potential benefits like try-polymorphism.
In the name of considering arguments for the opposite side … I feel like I haven’t considered the benefits of implicit ? well enough. It seemed like such a clear-cut no-no. I will look at try-polymorphism in more detail and educate myself. Right now I don’t have any valuable comments on it.
I certainly agree that early-exit is something to be wary about- I’ve said so several times in this thread. But that doesn’t make it non-trivial- it only makes it non-local, and only in a very simple and straightforward way.
Silently converting types and hiding things that can fail are also big problems. So far, we have seen at least 3 major problems with the implicit ? proposal. I feel like that is too much. Individually, these considerations might be fairly “trivial”, but together, they introduce a lot of things that you have to be careful about. Since Rust’s philosophy is to enable fearless programming without footguns/pitfalls as much as possible, anything like this that introduces such extra reasoning overhead goes against Rust’s goals. I don’t want to write in a language where I have to constantly worry about missing something that could go wrong. If I did, I’d be writing C/C++. This is possibly the single main reason why I love Rust and I’d hate it if new features were introduced that go against that. I love that Rust makes everything I need to consider about the correctness of my code obvious from the syntax and semantics of the language and enforces that I deal with all of it.
implicit await/async stuff
OK, I will admit that I perhaps should not have commented on this. I have almost no experience with writing async code and there are many people in this community with far more valid opinions, based on actual experience, to drive those discussions and make decisions about the best trade-offs. I don’t really understand the implications. Now I feel like my view was misled, as I did not realise the 2-sided nature of the tradeoffs involved.
However, your post was insightful. Thank you! I learned new things. 