[lkml]   [2001]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Coding Style
At 06:29 20/01/2001, Linus Torvalds wrote:
>On Fri, 19 Jan 2001, Mark I Manning IV wrote:
> > > And two spaces is not enough. If you write code that needs comments at
> > > the end of a line, your code is crap.
> >
> > Might i ask you to qualify that statement ?
>Ok. I'll qualify it. Add a "unless you write in assembly language" to the
>end. I have to admit that most assembly languages are terse and hard to
>read enough that you often want to comment at the end. In assembly you
>just don't tend to have enough flexibility to make the code readable, so
>you must live with unreadable code that is commented.

Would you not also add "unless you are defining structure definitions and
want to explain what each of the struct members means"?

>Notice? Not AFTER the statements.
>Why? Because you are likely to want to change the statements. You don't
>want to keep moving the comments around to line them up. And trying to
>have a multi-line comment with code is just HORRIBLE:

And structs are not likely to change so this argument would not longer apply?

Just curious.



"Programmers never die. They do a GOSUB without RETURN." - Unknown source
Anton Altaparmakov <aia21 at> (replace at with @)
Linux NTFS Maintainer
ICQ: 8561279 / WWW:

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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