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

Walter Bright newshound2 at digitalmars.com
Mon Nov 12 21:44:02 UTC 2018


On 11/12/2018 11:28 AM, Adam D. Ruppe wrote:
> D used to have a `bit` type, waaaay back in the day. It was renamed to `bool` 
> way back in D 0.148, released Feb 25, 2006.

D's old bit type was not a bool. It literally was a single bit, and an array of 
bits was packed into an int by the compiler.

It was abandoned because it caused more or less ugly problems with the type 
system, i.e. a <pointer to bit> required a phat pointer to represent it. A bit 
type is far better done as a library type.


More information about the Digitalmars-d-announce mailing list