Re: Structure vs purism ?

Allister MacLeod (amacleod@kersur.net)
Fri, 22 Jan 1999 01:10:48 -0500


H. Peter Anvin wrote:

> One thing: "goto" is really the only sane way in C to implement a
> so-called posit/admit structure, which *is* recognized by structural
> programming -- you assume that it is going to be OK, but need to do
> cleanup if you bail. Sometimes an early return or "return do_cleanup();"
> is acceptable, but if the function needs to do cleanup using local
> variables, then there is no real choice.

How about "return do_cleanup(local1, local2);"? Or would that
just be adding confusion to an already bad situation?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/