Hacker News new | ask | show | jobs
by leovonl 3401 days ago
Indeed, in the later case, exceptions are really an unnecessary cost.

In fact, another argument which could be made against the use of exceptions is that the abstraction per se is not a really good mechanism for abstracting error handling. Explicitly handling errors - including try!() à la Rust and/or monadic composition of functions - usually leads to a better error coverage, as safety is enforced by the type system itself.

1 comments

I would _love_ to write our firmware in Rust, but that's a much bigger sell than moving from C to C++.