On Sat, Sep 13, 2014 at 01:28:34PM +0100, Dominik Vogt wrote:
> Argh! In X, the constant "True" is defined to 0, so freeing the
> repeat string was done when it shouldn't be and vice versa. One
> day I'll clean up that crap with True vs. TRUE vs. !!x vs. x == 1.
Why do we have it? I mean, I can understand not wanting to use the C99
type of 'bool' but nowadays 'bool' might be OK, and even if you're
paranoid about older compilers and standards, why not just use an
integer for everything? The problem with using "True" or "False" is
that you have to remember to actually use them and compare against them.
There's still cases in fvwm where:
Bool do_something(void)
{
fprintf(stderr, "You what?");
return True;
}
if (do_something() == 1) { ... }
Happens, and that to me speaks volumes about the usefulness of declaring
True/False over just having an int or using a 'bool' type.
-- Thomas Adam
--
"Deep in my heart I wish I was wrong. But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)