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: Re: Re: more questions about efficient C code Message-ID: <5755@utzoo.UUCP> Date: Thu, 4-Jul-85 13:01:58 EDT Article-I.D.: utzoo.5755 Posted: Thu Jul 4 13:01:58 1985 Date-Received: Thu, 4-Jul-85 13:01:58 EDT References: <474@crystal.UUCP> <397@umcp-cs.UUCP> <721@wlcrjs.UUCP> Organization: U of Toronto Zoology Lines: 21 > > Rubbish. "Any experienced programmer should be able to understand that" > > really means "we know it's hard to read, but...". The idea is to make > > No!, it does not mean that. It means that the novice who has the complaint > about not being able to understand things like [assignment inside if] > does not yet clearly understand that in C the expression (a = b) has a value, > which is whats on the RHS of the =, that can be conviently tested! It is entirely possible to understand the semantics of the code fully and still consider it unnecessarily obscure and hard to read. The mark of a good programmer is that his code is *easy* to read, not just *possible* to read. Using every obfuscatory feature of the language, perhaps in the (oft-mistaken) belief that it improves efficiency, and then pleading that "any experienced programmer should be able to understand that" is the mark of someone who doesn't understand what this business is about. "To be clear is professional; not to be clear is unprofessional." -- Sir Ernest Gowers -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry