Cryptic C

Peter da Silva peter at baylor.UUCP
Sun Aug 18 23:18:34 AEST 1985


> While this kludge obviously works, I think it adds one extra level
> of mental processing when one is reading conditionals in C.  This
> is because there is no visible percept corresponding to one's
> thoughts about comparison against zero; one has to explicitly apply
> a conceptual language evaluation rule to map the expression into a
> condition in order to extract the full meaning of the condition.

Boy, I'd like to let a real psychologist go over that statement. I don't
notice any effort understanding if(some expression returning a small int)
in terms of booleans. Maybe because I never bothered with the "!= NULL"
construct...

> 	typedef int	bool;

#define bool char /* save a bit of memory eh? */

typedef int bool:1;	/* pity this won't work */
-- 
	Peter da Silva (the mad Australian werewolf)
		UUCP: ...!shell!neuro1!{hyd-ptd,baylor,datafac}!peter
		MCI: PDASILVA; CIS: 70216,1076



More information about the Comp.lang.c mailing list