I'm sitting with a C99 code base and thinking about introducing

<stdbool.h>, the 'bool' type and true/false. Anything special

have to keep in mind?

bool breaks libraries.

The snag is that you have, say some image-processing routines. One of them

test whether a point is in a polygon.

OK so that's

bool ptinpoly(POLYGON *poly, double x, double y)

That would be OK if bool was a built-in type. But a geometry library as no

business exporting a boolean type to the rest of the program. If you define

bool in any way, either you conflict with someone else, or you have bool,

boolean, BOOL, bit, flag, logical, and bool_t all swilling around your code

for the same thing.

Qt suggest that people don't use boolean for parameters. Their thinking is

that

sd = standard_deviation(x, N, true);

is confusing. The function obviously calculates the standard deviation, x is

obviously the samples and N size. But does true mean population or sample

deviation? Or is is something else entirely? Very hard to be sure.

sd = standard_deviation(x, N, SD_POPULATION);

is the way to go.