[parted-devel] tab and space, part 1 - Goals

Håkon Løvdal hlovdal at gmail.com
Fri Mar 9 02:06:59 CET 2007


So what should the goal of using space/tab correctly
be? It must be to make the code as easy as possible to
read. As written in the preface of SICP, "Thus, programs
must be written for people to read, and only incidentally
for machines to execute."

Considering the following relation with regards to the
ratio between writing and reading source code. Code is
written just once by one person (by also including some
of the editing, let us say that code is written somewhere
in the range of 1 to 10 times). Reading the code however
is done by many people, many times. We are here talking
about a 2 digit number of persons as an absolute minimum,
depending of how "read" is interpreted it could mean
hundreds or thousands of developers around the world.

This means that making the code easy to read is several
orders of magnitude more important than making code easy to
write from a layout perspective. In fact the readability of
the code layout should be the _only_ criteria for choosing
a given layout. How difficult it is to write such a layout
is irrelevant.

People have different preferences and there are no
one-size-fits-all value for indentation width. Someone will
always be dissatisfied if any fixed width is forced to be
"standard". That would thus reduce the readability for
parts of the developer base.

Is anything I have written above untrue?
Do you manage to disagree with any of it?

(continued in part 2)



More information about the parted-devel mailing list