[OT] Is there a real alternative to exceptions ?
Manu
turkeyman at gmail.com
Fri Feb 7 02:02:51 UTC 2025
There is, we discussed it informally at dconf quite a lot.
It looks like this:
CppCon 2018: Brand & Nash “What Could Possibly Go Wrong?: A Tale of
Expectations and Exceptions” <https://www.youtube.com/watch?v=GC4cp4U2f2E>
At dconf while discussing this strategy, I had personally never heard of
this proposal but the scheme we were discussing in detail at dconf turms
out to be almost exactly what is presented in this lecture... which is a
good sign! It's not new, and other people agree it's an excellent idea.
On Fri, 17 Jan 2025 at 05:05, Basile B. via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:
> I have the feeling that things like
>
> ```
> a.map!(mapperFun).reduce!(reducerFun).array;
> ```
>
> is only possible thanks to an exception system. A similar
> expressivity looks impossible for example with the idom of result
> tuple `(error_code, actuallResult)`.
>
> that problem is currently something rather serious, in the sense
> that, let's say you want to make a standard library, you really
> need to have a well defined way of handling errors.
>
> I'll be interested to read your thoughts on that topic.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20250207/374d5e95/attachment.htm>
More information about the Digitalmars-d
mailing list