[Cuis-dev] Exception handler blocks with non-local returns

Phil B pbpublist at gmail.com
Sun Oct 13 21:36:57 PDT 2019


Andres,

On Sun, Oct 13, 2019 at 10:51 PM Andres Valloud via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Do we even agree this is a problem?
>

I'd say there's a second question: If so, what do we do about it?

I would agree it's a problem and that it's a question of how to handle it.
I'm in favor of at least voluntarily minimizing the use of non-local
returns just to ensure expected debugger behavior regardless of whether or
not it's technically 'legal' and/or we effectively forbid it.

One bit of feedback on this approach related to the last time we forbid
something this way: I still absolutely *hate* the exceptions for shadowing
variable names.  I find the mechanism annoying for something that is a
non-problem to me.  Others may feel that way about raising exceptions for
this issue.  I would much prefer that we handle issues like these with some
sort of opt-in linting/logging mechanism than mandatory policy enforced by
exceptions.


> d) it's possible to distort the exception handling mechanism behavior
> with non-local returns.
>

This one concerns me because we effectively have what appears to be a
'legal' (in the sense that blocks can do it) end-run around the exception
mechanism.  Are there any examples of existing core code / packages with
subtle bugs because of this?

Finally, does any literature (Blue Book, ANSI, previous discussion(s)...
whatever) specifically discuss do's/don'ts re: exception blocks or is it
just an ambiguous issue that was never delved into?  If anything does
exist, shouldn't we also consider it regarding how to proceed?

Thanks,
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20191014/0f7cbbb1/attachment.htm>


More information about the Cuis-dev mailing list