3 ms·
> What is the reason for allowing returns in try-catch-finally blocks? Disallowing them is more work. I don't dislike C# forbidding flow control in finally bl
by masklinn 5y ago
> What is the reason for allowing returns in try-catch-finally blocks?
Disallowing them is more work.
I don't dislike C# forbidding flow control in finally blocks, but I can well understand language designers not caring.
- mjevans 5y agoFrom an assembly focused point of view, multiple "return" functions executing is madness. Logically it makes far more sense for the flow of execution to be fully controlled by the return and absolutely depart the function. I now want languages who's spec allows this insanity to have a sanitizer like C#'s to prevent more footguns.