more questions about efficient C code

Henry Spencer henry at utzoo.UUCP
Fri Jul 5 03:01:58 AEST 1985


> > 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



More information about the Comp.lang.c mailing list