DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

Carl Sturtivant sturtivant at gmail.com
Wed Nov 14 18:59:30 UTC 2018


On Monday, 12 November 2018 at 10:05:09 UTC, Jonathan M Davis 
wrote:
> *sigh* Well, I guess that's the core issue right there. A lot 
> of us would strongly disagree with the idea that bool is an 
> integral type and consider code that treats it as such as 
> inviting bugs. We _want_ bool to be considered as being 
> completely distinct from integer types. The fact that you can 
> ever pass 0 or 1 to a function that accepts bool without a cast 
> is a problem in and of itself. But it doesn't really surprise 
> me that Walter doesn't agree on that point, since he's never 
> agreed on that point, though I was hoping that this DIP was 
> convincing enough, and its failure is certainly disappointing.

I'm at a loss to see any significant advantage to having bool as 
a part of the language itself if it isn't deliberately isolated 
from `integral types`.


More information about the Digitalmars-d-announce mailing list