On 06/06/2013 8:59 AM, Gábor Lehel wrote:

Am I way off base with this? An embarrassing misconception? To summarize
my train of thought

  * Catchable exceptions can be implemented
  * But we don't want to, because it would force everyone to think about
exception safety
  * That could however be avoided with appropriate restrictions
  * Rust's type system already gives us the tools to impose those
restrictions, as evidenced by them being imposed on `try()`
  * Therefore it should be possible to have much of the benefit of
catchable exceptions, without their drawbacks

No. The train of thought is that they _already are_ implemented to this level -- via task isolation[1] -- and people asking for "catchable exceptions" are (so far) actually asking for us to lift those restrictions[2], which we don't want to do.

-Graydon

[1] If it helps avoid wincing about the implied "cost of spawning a task" (allocating a segment, switching to it, and switching back on return) it might help to know that there are some serious discussions going on in the background about cactus stacks and the requisite scheduler hooks required to support cilk-like fork/join parallelism.

[2] And/or asking to add "first class" language support for the idioms in the form of new keywords, RTTI or additional control structures. In case this is not obvious: we are trying to move as much as possible these days _out_ of the core language and into libraries and macros. This usually results in faster iteration, less fragility, fewer personnel and development/integration bottlenecks, and overall better implementations.

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

Reply via email to