Get rid of bit and bit[] ?
Stewart Gordon
smjg_1998 at yahoo.com
Fri Feb 24 05:13:51 PST 2006
Walter Bright wrote:
> I think the basic type bit has been a failure. It's a substantial increase
> in the compiler and runtime complexity to support it. Nobody seems happy
> about bit being a boolean type. There's no reasonable way to take a pointer
> to a bit, meaning that out and inout bit parameters are inconsistent and
> kludgy.
>
> Should bit and bit[] be removed before 1.0?
>
> There is a place for bit[] as a library type, though.
>
> So what do people think?
I was just thinking about my BitArray stuff in my utility library
http://pr.stewartsplace.org.uk/d/sutil/
and looking again at how it's implemented. It doesn't use D's bit
arrays internally, so the only implication for the library really is
getting rid of the conversions to and from them. (And debugging the
big-endian implementation logic!)
But it's worth looking at it before reinventing the wheel, at least for
those of you who haven't already reinvented the wheel.... :-)
Stewart.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:- C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y
------END GEEK CODE BLOCK------
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
More information about the Digitalmars-d
mailing list