[Shootout-list] Re: Optimizing for speed vs. beauty
Bengt Kleberg
bengt.kleberg@ericsson.com
Thu, 30 Sep 2004 09:59:07 +0200
Brandon J. Van Every wrote:
...deleted
>
> Well, I'm of the camp that LOC is a big, ancient lie. For instance, all
> of the ASM code I've ever written professionally has had lotsa extra
> LOCs just to keep things clear. And so did the C code which preceeded
> it, so that the compiler generated ASM code would stand a chance of
> being what I wanted, without having to do it all by hand. Extra LOC was
> clearly the most 'beautiful' way to handle my class of low-level
> problems. Yet I imagine some HLL guy would just make vampire cross
1 if you mean that you have to write comments to explain what you are
doing, then comments are not counted as lines of code. as an aside i
find this to be wrong. they should be since some langauages needs lots
of comments, while others do not.
2 the number of bugs per LOC is about constant for all languages
(atleast this was the case when i partook in a course on safeware about
5 years ago). therefore one might want a low LOC count per program.
3 it is possible to ''cheat'' by having artificially long lines. those
''cheats'' are not of interest for this discussion.
bengt