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 ?
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/

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