Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: C Indentation Survey Results (not long...) Message-ID: <5544@utzoo.UUCP> Date: Thu, 25-Apr-85 12:13:26 EST Article-I.D.: utzoo.5544 Posted: Thu Apr 25 12:13:26 1985 Date-Received: Thu, 25-Apr-85 12:13:26 EST References: <9930@brl-tgr.ARPA>, <381@busch.UUCP> <5497@utzoo.UUCP> Organization: U of Toronto Zoology Lines: 48 > What I was referring to was that I found it extremely hard to > read programs where the programming style changed (indentation > or otherwise) in the middle of the program. > ... > This also applies to modifying someone else's code, too. If > you're modifying someone else's code, you should use their style, > just to keep it consistent within that program. ... Very true. No argument there. > I didn't say (or at > least didn't mean to say) that readability had anything to do > with whether or not the style matched anyone else's style. But it does! > Just > as long as the same style is used throughout the program, the > next person that comes along can probably figure it out. > ... > What I'm getting at is that most people can probably figure out > the style used in a program when they first start reading it. Of course. Somehow. After a fair bit of head-scratching and cursing. The whole point I was making is that "he can probably figure it out" is a thoroughly unprofessional attitude. You are supposed to make *SURE* he can figure it out, by making your code as clear as possible. The idea is to maximize clarity, not to aim for a minimum level and claim that it's good enough. > Like I said before, my point was that it didn't matter as much > what style you used, just that you kept to it. At least then > you give people an idea of what you're trying to do. I agree 100% that keeping to a single style (at least within each program) is more important than the specific choice of style. But this does *not* imply that the specific choice of style is unimportant. To maximize readability, use what your reader is familiar with. > But I don't believe that just because you use a different style > than anyone else's, you're wrong. Not wrong, no. Unless you are writing programs that other people are supposed to be able to read *easily*, i.e. programs that other people will need to maintain or change. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry