On Sunday, 28 April 2013 at 08:40:01 UTC, Walter Bright wrote:
On 4/27/2013 9:38 PM, kenji hara wrote:
On the other hand, D looks like having *special rule* of 0 and
1 literal for
boolean type. Even if the underlying rule is sane (partial
ordering rule and
VRP), the combination makes weird behavior.
Again, whether it is "weird" or not comes from your
perspective. From mine, a bool is a 1 bit integer. There is
nothing weird about its behavior - it behaves just like all the
other integer types.
Then be consistent. Convert int to bool by truncating.