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

Jonathan M Davis newsgroup.d at jmdavisprog.com
Mon Nov 12 10:05:09 UTC 2018


On Monday, November 12, 2018 2:45:14 AM MST Mike Parker via Digitalmars-d-
announce wrote:
> DIP 1015, "Deprecation and removal of implicit conversion from
> integer and character literals to bool, has been rejected,
> primarily on the grounds that it is factually incorrect in
> treating bool as a type distinct from other integral types.

*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.

- Jonathan M Davis





More information about the Digitalmars-d-announce mailing list