Alternatives to exceptions for error handling
Jacob Carlborg
doob at me.com
Mon Nov 23 10:58:29 UTC 2020
On Sunday, 22 November 2020 at 17:37:18 UTC, Roman Kashitsyn
wrote:
> In the video from DConf 2020 about @live functions
> (https://youtu.be/XQHAIglE9CU) Walter mentioned that all @live
> functions are nothrow. He also thinks that exceptions are
> obsolete.
I haven't watched the video yet, but in general I think we need
some form of error handling that more or less have the same
semantics as the existing one. There are other ways to implement
what looks like exception. Just look at the error handling in
Swift, Zig and the proposal for C++ [1]. I think without any form
of language support and syntax sugar, error handling is going to
be a pain.
[1]
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list