--- Comment #2 from bearophile_h...@eml.cc 2011-12-08 04:33:39 PST ---
(In reply to comment #1)
> I don't think:
> int x = true;
> should compile. That looks like a bug to me (a relic of 'bit').
The 'bit' type has no relation with this problem.
In languages as Java and Pascal boolean values and integer values are two very
distinct types. In languages like C/C++/D/Python boolean is a kind of subset of
integer type. This means
x = b; // OK, it's a subset
b = x; // error, generally
There are many situations where the implicit true -> 1 conversion is handy.
D accepts the implicit true -> 1 conversion in all cases. Refusing it only in
BigInt assignements breaks the language simmetry. I don't think the implicit
true -> 1 conversion will be removed from D2, so I think it should be present
in BigInts too.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------