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 Thu, Jan 21, 1999 at 10:48:45AM -0500, Richard B. Johnson wrote:
> funct()
> {
> if(funct1()) {
> if(funct2()) {
> if(funct3()) {
> if(funct4())
> do_something();
> else
> compain_about_funct4();
> }
> else
> complain_about_funct3();
> }
> else
> complain_about_funct2();
> }
> else
> complain_about_funct1();
> }
> }
>
> ...... produces absolutely rotten code on every compiler I've ever
> used. This is because it jumps on the normal-flow condition.

You forget to mention that it's completely unreadable too.
Especially when do_something(); is a couple of pages long.

-- Jamie

-
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.015 / U:4.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site