[lkml]   [2004]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: PATCH, RFC: 2.6 Documentation/Codingstyle

    On Fri, 13 Feb 2004, Andries Brouwer wrote:

    > I do. (That is, 80xN with N in 24..60 or so.)
    > The 80 here has a pedagogical and a practical purpose.
    > The practical one is that it makes sure that everybody can read the source.
    > The pedagogical is to invite you to arrange the code in a different way
    > if you are nesting too deeply or your expressions are too complicated.

    Deeply nested doesn't mean unreadable or badly structured. 1 tab in the
    function, 1tab a switch, 1 if, 1 for, 1 if and you have already lost
    half of the available space. It's not difficult to find lines compressed
    towards the 79th column in the kernel sources.
    I propose to change "hard limit" to "soft limit" to avoid things like this:

    rc=idefloppy_begin_format(drive, inode,
    (int *)arg);

    IMO we should try to keep function calls on the same line. btw it's
    only a matter of taste and the compiler accepts ugly code too :))

    > There is also ergonomics. There is a reason newspapers do not print
    > text across the full width of the page - it would be very difficult
    > to read.

    Code has only one instruction per line.


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

     \ /
      Last update: 2005-03-22 14:00    [W:0.022 / U:1.300 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site