On 3/1/2013 12:07 PM, Robert Clausecker wrote:
For quite a lot applications it would be nice to be able to treat bool as a
one bit (unsigned) integer
For quite a lot applications it would be nice to be able to treat bool as a
one bit (unsigned) integer
The languages that work that way, like C and Python, do that
because they originally lacked a Boolean type. Retrofitting
a Boolean type results in weird semantics, like "True + True"
being equal to 2, as it is in Python. It's a classic mistake
in language design.
Go had a Boolean type from the beginning, and got this one right.
John Nagle
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.