News for hackers. Stuff that matters.
Re:Show HN: A pure C89 implementation of Go channels, with b... by __d on Thursday December 14, 2023 @12:17AM (#38638069)
> int is still the Boolean type in C, and null pointers and zeros are still > falsy, relational expressions yield 0 or 1 of type int, and #define bool > is just a sham for anal retentives.

Alternatively, and especially in a library API, using bool is a clear specification of semantics.

An int parameter could have many meanings. An int return value similarly. In both cases, using "bool" makes the usage instantly more clear, without the need for comments, or man pages, or Doxygen, or super_long_parameter_names, or whatever.

I think it's useful.

There are no comments on this comment yet.