No Such Thing

DHowell.ES at Xerox.ARPA DHowell.ES at Xerox.ARPA
Tue Aug 27 05:57:27 AEST 1985


> > ... when it comes to defining one's own
> > language extensions, this one seems like a winner:
> > 
> > 	typedef int	bool;
> > 	#define	false	0
> > 	#define	true	1
> > 

> Seems like a loser to me. Just takes up space. I actually have to READ
it.

Not really.  You could usually safely assume that if someone is defining
true and false, he/she is defining it as above.  (if some joker decides
to define false as 29 and true as 53, he should be forced for eternity
to covert 10,000-line APL programs to Fortran! :-) )  I think it is much
easier to read things such as:

   done _ true;

than:

   done _ 1;
   
Of course, explanatory comments in any case improves readability even
more.

Dan



More information about the Comp.lang.c mailing list