I thought Rust was not going to implement C++ style exceptions . are these scopes not very similar ? Do you unwind the stack etc when you are nested deeply within a scope and a fail occurs ?
Also more importantly can you safely handle tasks that were created in the now to be unwound scopes ? I don't know about the internals of Rust Tasks but yanking the stack when a sub task was created from it and is running on another thread could get tricky. This was the main reason I was thinking scopes should be a task underneath while its heavy it would not be used in most cases. In most case use a Com Hresult/ IErrorInfo scheme ( which can hook into logging) , when you do need guaranteed unwinding use a scope ( or fail scope) based on a task behind the scenes. To me it fits nicely into the ideas of the language. Ben > "scope" would be executed unconditionally at the end of the current block, > while the rules for standard Rust RAII are somewhat more complex and depend > on the initedness of the variable, whether it was moved, etc. There's a > hidden dynamic flag created by the compiler and set > _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
