On 9/10/13, Walter Bright <newshou...@digitalmars.com> wrote: > noexcept means the function doesn't throw any exceptions. But it doesn't > check! > The above code compiles, and then fails at runtime. The opportunity for D is > to > deliver what C++ has promised.
I wish we called it 'noexcept' as well instead of 'nothrow', because Throwables and Errors are still allowed to escape. When you're interfacing with other languages (e.g. passing a callback), you have to make sure *no* exceptions escape in the C callback. Marking the callback with nothrow only gets us one step close to that.