Messages in this thread |  | | Date | Thu, 27 Jul 2006 05:51:10 +0200 | | From | ricknu-0@student ... | | Subject | Re: [RFC][PATCH] A generic boolean (version 6) |
| |
Citerar Josef Sipek <jsipek@fsl.cs.sunysb.edu>:
> On Wed, Jul 26, 2006 at 06:06:22PM -0700, Paul Jackson wrote: > > Richard wrote: > > > * removed the #undef false/true and #define false/true > > > > Good - thanks. > > > > +enum { > > + false = 0, > > + true = 1 > > +}; > > You probably have said it before, but why do we need this?
Well Jeff, there is no _need_ for the false and true, but it makes the code more readable to many of us. (Why else is there all these definitions of false and true?) There is other opinions on this and that is one of the reason* bool isn't defined as:
enum { false, true } bool;
letting us choose our own way. So when (hopefully) the converting to these starts, it will only affect the files already using some sort of false and true. If the author is more comfortable with 0 and 1's, that will be respectet (by me, at least).
Hope it make some sense.
> Josef "Jeff" Sipek.
/Richard Knutsson
PS If I got you wrong and you meant why it can't be defined where it is used, I refere you to Andrew's mail "[patch 1/1] consolidate TRUE and FALSE", where a redefinition occured (of TRUE/FALSE). DS
* another is that C99 defines the boolean type for us (as _Bool).
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |