the bit[] type

jcc7 jccalvarese at gmail.com
Thu Sep 23 06:57:41 PDT 2010


== Quote from Stewart Gordon (smjg_1998 at yahoo.com)'s article
> On 22/09/2010 22:26, Emil Madsen wrote:
> > Okay I'm interresting in getting more infomation about the bit[] type;
> > - is it still implemented in D1?
> bit is now just an alias of bool, defined in object.
> > - and why was it removed?
> I think because there were too many complaints of bugs with it, and the
> conclusion was reached that it's too difficult to implement without bugs.
> > - is it possible to get a link to the design considerations of removing
> > it, and such?
> <snip>
> There must have been a discussion that led to it, but I can't find it at
> the moment.
> Stewart.

I don't remember the details, but from the changelog
(http://www.digitalmars.com/d/1.0/changelog2.html), it looks like
Version D 0.148 (Feb 25, 2006) was when the last big change happened:
 * Removed bit basic type.
 * Added bool basic type.
 * Added BitArray.

These page covers some of the early controversy:
http://www.prowiki.org/wiki4d/wiki.cgi?BooleanNotEquBit
http://www.prowiki.org/wiki4d/wiki.cgi?BooleanNotEquBit/PostsByWalter

I don't think the pages has been updated with much (if any) detail about how and
why the change finally happened removing "bit", but it does looks like the "bool"
alias was added in D 0.69 (August 11, 2003).

As you can see from the links to newsgroup threads at the bottom of the first
page, the topic was discussed over many years. Perhaps the discussions have
tapered off in recent years because the current approach is right.

jcc7


More information about the Digitalmars-d-announce mailing list