Hi,

On 29.5.2014 02:38, Oleg Eterevsky wrote:
2. What about exceptions? Is it a design decision not to support them,
or are they planned for some future version? I understand, that
exceptions make memory management more difficult, but maybe there are
ways to restrict their usage to avoid problems (like making it
impossible to pass references as exception parameters?)
I had the same question once. The answer was that exception-safe code is difficult to write and maintain. Under the closer investigation the problem is that shared data between inner and outside code of the try block is a problem and it is similar problem to concurrent programming. Therefore tasks are building blocks for concurrent code as well for exception-like error handling. The only thing that Rust current lacks is a way to run task synchronously on the stack of the caller just for the case when recovery from fail is needed but concurrency is not.

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

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

Reply via email to