scope(exit) with expected library

WebFreak001 d.forum at webfreak.org
Wed Aug 25 16:34:14 UTC 2021


On Wednesday, 25 August 2021 at 15:30:57 UTC, Steven 
Schveighoffer wrote:
> [...]
>
> Another approach is to let the compiler deal with the error 
> handling and not muddy your return type. Swift does something 
> similar, where it rewrites the throw/catch into a standard 
> return and doesn't do actual thrown exceptions. There are some 
> caveats, but if we could fit this kind of error handling into 
> mostly-similar syntax (i.e. the same ease of exceptions without 
> the actual problems that exceptions and stack unwinding bring), 
> it might make things much easier to transition.
>
> -Steve

I like the Swift error handling, so I think this would be a great 
idea for nothrow code with error handling too.


More information about the Digitalmars-d-learn mailing list