3 ms·
Most languages will probably still do their own error reporting, so it will arguably not do very much, except make extra work for language maintainers to make t
by earenndil 8y ago
Most languages will probably still do their own error reporting, so it will arguably not do very much, except make extra work for language maintainers to make their own error reporting coexist with the c type.
- naasking 8y agoThey already need to do that with errno, and this proposal would make error handling simpler, so it still seems like win.
- int_19h 8y agoThe point is that right now, that error reporting usually ends at the FFI boundary. But with this thing, it could be propagated across the boundary, in a standard way that the other side hopefully has a meaningful projection for. And if you cross the boundary twice (back and forth), and nothing in between handles the error, then it can even be propagated across both boundaries in a way that allows the original error to be preserved or reconstituted. So you could e.g. throw Python exceptions across C++ stack frames and catch them on the other side - and C++ would correctly execute destructors etc.