Re: goto considered essential

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jason:

Thank you for your detailed reply.

You characterize errors as falling into two categories,
at least in the context of this discussion. But I submit
that there is a third category, at least from the
viewpoint of a function that detects an error. In
this category are errors that are to be handled by the
caller. The function itself neither panics nor performs
recovery, but simply reports the error to the caller.
It is this class of errors that concern me most here,
insofar as code clarity is concerned. For such situations,
gotos (or something like them) are really the only answer --
unless one defines a full-blown nonlocal goto semantics,
like Java or Ada exceptions, or PL/I on-units.

Tom

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu