Hi Graydon,

On 29/04/13 19:26, Graydon Hoare wrote:
I've read your email a few times and I _think_ it mostly consists of a request to add catchable exceptions to the language. Which we won't do (or I won't do, and I will resist strongly as I think it will hurt users, performance and correctness of code). I will reply -- somewhat repetitively, I'm afraid -- to minor points but want to clarify a few things in advance: ... It's not the keyword(s) that I don't want to add; it's breaking the mental model and adding the extra semantic and runtime machinery.

Thanks for taking the time to think this through and spell out what was there, what can be done, and what won't be done. It's appreciated.

It does sound like a lot of what I'd imagine as an ideal system is already there. I still find the syntax unwieldy (comparing to C and Python; Rust is already a lot nicer than C++, Scala, etc.). Having a stack of handlers from which to build up functionality probably lessens that syntax burden a great deal though :)

I still feel like there would be a whole class of error handling that isn't possible in a simple way without exception throwing/catching, but maybe I'm wrong. I can see you've thought this through a lot, and believe Rust's way is better, even if I can't see WHY right now. I'll give it time to grow on me, and see if I can't learn something :)

In that regard, what would really help would be if the Rust for C++ introduction covered the typical use cases of error handling / aborts / exceptions and how they map to Rust-style condition handling, but I understand that adding wiki entries might not be a major focus right now :)

--
Lee

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to