lkml.org 
[lkml]   [1999]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.045 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site