C Indentation Survey Results (long...)

mwm at ucbtopaz.CC.Berkeley.ARPA mwm at ucbtopaz.CC.Berkeley.ARPA
Thu Apr 25 13:17:54 AEST 1985


[C blows green road runners.]

In article <5521 at utzoo.UUCP> henry at utzoo.UUCP (Henry Spencer) writes:
>I find it hard to imagine anything more unprofessional than making
>your code harder for other people to read, just because you happen
>to like it that way.  (Obviously I am talking about production software,
>not for-author's-use-only tinkering, but remember that code sometimes
>slides across the boundary unofficially.)

In my experience code always slides across the boundary, unless you
throw it away. That takes the point out of trying to preserve a style
that you find easy to read. On the other hand:

Whenever I read/write code, I prefer it in a format that I find easy to
read. The AI community found the solution to the problem of different
code formatting styles two (or more?) decades ago: customizable pretty
printers (beautifiers, if you must). You read your code into the editor,
notice that the format is "ugly", and tell the editor to format it the
way you like it. The next person to come along goes through the same
process. For an organization, you prepare a "standard" setting for the
pretty printer hooks, and the code goes into that format when you check
it into *cs. Everybody is happy, as they can work on the code in their
favorite format (or non-format, if that's the case), and all the
organizational listing look alike. What more could you want?

Therefore, I am not going to make my life more difficult by trying to
change my coding style to something less readable, I'm going to live
with a dual standard (and force everybody else who wishes to work on my
code to do the same) until I get around to writing a customizable pretty
printer.

	<mike



More information about the Comp.lang.c mailing list