Re: RFC: booleans and the kernel

Oliver Xymoron
2002-01-24T19:53:08Z

On Thu, 24 Jan 2002, Jeff Garzik wrote:

> A small issue...
>
> C99 introduced _Bool as a builtin type. The gcc patch for it went into
> cvs around Dec 2000. Any objections to propagating this type and usage
> of 'true' and 'false' around the kernel?

Ugh, no. C doesn't need booleans, neither do Perl or Python. This is a
sickness imported from _recent_ C++ by way of Java by way of Pascal. This
just complicates things.

> Where variables are truly boolean use of a bool type makes the
> intentions of the code more clear. And it also gives the compiler a
> slightly better chance to optimize code [I suspect].

Unlikely. The compiler can already figure this sort of thing out from
context.

--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."