Messages in this thread | | | Date | Fri, 22 Jan 1999 11:15:12 -0500 (EST) | From | John Alvord <> | Subject | Re: Structure vs purism ? |
| |
On Fri, 22 Jan 1999, Allister MacLeod wrote:
> 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? >
I always thought the biggest problem was caused by backward gotos. That was what caused the number of possible paths to explode combinatorially. Forward gotos are just one way of expressing an end to a logic sequence and don't increase the number of possible paths.... sometimes they decrease them... and they often decrease the nesting level which can make code harder to read and understand.
john alvord
Music, Management, Poetry and more... http://www.candlelist.org/kuilema Cheap CDs @ http://www.cruzio.com/~billpeet/MusicByCandlelight
- 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/
| |