lkml.org 
[lkml]   [2003]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Dri-devel] Re: [PATCH] CodingStyle fixes for drm_agpsupport
On Mon, Aug 11, 2003 at 10:59:41AM -0700, Larry McVoy wrote:
>...
> It is inconsistent, on purpose. It's essentially like perl's
>
> return unless pointer;
>
> which is a oneliner, almost like an assert().

perl is EEeeeeevil....



> Maybe this will help: I insist on braces on anything with indentation so
> that I can scan them more quickly. If I gave you a choice between
>
> if (!pointer) {
> return (whatever);
> }
>
> if (!pointer) return (whatever);
>
> which one will you type more often?


if (!pointer) {
return (whatever);
}


because it's consistent, and guaranteed safe from stupid parsing errors
that can waste days of debug time when someone decides to add to it.
("its just a little change that cant hurt anything", ha ha)


Style Matters. (and so do comments, while we're on the subject)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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