On 1/12/2015 3:27 AM, Dicebot wrote:
.. and have many other issues instead :)

Right now my experience from some quick experiments with Rust seems to indicate
that it is a good sort inconvenience for medium-to-big applications as it forces
you to explicitly consider all possible exceptional paths possible in
application without and does not add any runtime overhead.

For smaller / less important programs verbosity does seem inconvenient in an
unpleasant way indeed.

For me the primary advantage of EH is put the code to deal with the error in the place where it is most appropriate to deal with it. With error codes, you have to deal with propagating the errors everywhere. Error codes still require manual insertion of unwinding code, and that can get fairly ugly when dealing with transactions:

  http://dlang.org/exception-safe.html

Scope guard and RAII deal with most of the issues with having correct error recovery.

Reply via email to