News for hackers. Stuff that matters.
Re:Do I Really Need a Programming Language? by delinka on Sunday December 29, 2013 @05:28AM (#6979113)
Iff in your language of choice a Boolean is always converted to a 1 or 0. In C, at least, that's not necessarily the case.

That said, I'm always looking for the least branchy way of doing things.

Re:Do I Really Need a Programming Language? by dbaupp on Sunday December 29, 2013 @05:42AM (#6979149)
I was under the impression that the C standard does mandate that comparisons give 1 and 0 for true and false. (Other nonzero things are considered true, but a plain comparison won't return them.)
Re:Do I Really Need a Programming Language? by userbinator on Sunday December 29, 2013 @08:56AM (#6979522)
It does.

ISO/IEC 9899:1999, 6.5.8, p6 has this to say:

"Each of the operators < (less than), > (greater than), <= (less than or equal to), and >= (greater than or equal to) shall yield 1 if the specified relation is true and 0 if it is false. The result has type int."