lkml.org 
[lkml]   [2003]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: any chance of 2.6.0-test*?
Date
Kai Henningsen wrote:
> Well ... he did have some nice ideas. Unfortunately, they usually don't
> get palatable until someone else has worked on them.

I actually *liked* Modula-2... but I haven't used it since the very early
90s. I guess I didn't like it *that* much, huh? ;)

> If you look into Wirth's books and see that the example code in there ...
>
> * uses one(!) space indentation
> * routinely puts several statements on one line

I've got a copy of the classic "Algorithms + Data Structures = Programs"; in
it, Wirth uses four-space indentation but a proportional font. The style
isn't all that bad. Hell, I've got worse stuff in some of *my* books --
oops, shouldn't have typed that... ;)

One-space indents may very well be an artifact of idiot copy editors, and
not the author.

> * typically uses one- or two-character variable names

There is one instance when one/two-character variable names make sense:
mathematical code that directly implements numericla algorithms from the
text. In such a case, short variable names correspond directly to standard
notation; using longer names would actually obscure the correspondence
between text and code. I also don't see the point of using "array_index"
over a plain old traditional "i" in a loop.

Rarely is any coding "rule" absolute. The point is clarity; if a "goto" or
one-character identifier make sense, use'em.

For those who growl -- I think this kind of discussion *has* value in the
kernel mailing list. Kernel newbies and such can learn a great deal from
rational, calm debates among experts; if they learn, their contributions to
the kernel will be better.

Of course, note the "rational" and "calm" above, which does not apply to the
Stallman debate... ;)

I enjoy the implementation debates; they give me a better idea of where the
kernel is going, so I can figure out where to stick my oar in the waters.

--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Professional programming for science and engineering;
Interesting and unusual bits of very free code.

-
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:32    [W:0.040 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site