[thelist] PAGE OPTIMIZATION: source readability v. download w eight

Chris W. Parker cparker at swatgear.com
Wed Jun 12 15:48:00 CDT 2002


> > blah()
> > {
> >  more blah
> > }
>
> According to Linus, the above way is correct for functions,
> incorrect for if statements.
> Who knew? I still don't like it. Uh, I mean, it wastes space
> for no benefit.

for no benefit that you can see that is. for example, the benefit(s) i
see is that it's more readable and specific. here's what i mean by
specific...

if we take:

if(this=this) {
  statement1;
} else {
  statement2;
}

it's not immediately apparent to me (maybe it's because i'm not used to
this style, or maybe it's because it's wrong [hehe]) where statement1
and statemen2 fall in hierarchy of the if...else.

however, with...

if(this=this)
{
  statement1;
}
else
{
  statement2;
}

i can immediately see that statement1 and statement2 are contained
within seperate blocks of code and are divided by the else statement.

but that's just *me*, OR maybe this way is correct, i'm not totally
sure. ;)


chris.



More information about the thelist mailing list