BitArray - Is there one?

Era Scarecrow rtcvb32 at yahoo.com
Mon May 28 14:39:20 PDT 2012


On Sunday, 27 May 2012 at 18:25:38 UTC, Jonathan M Davis wrote:
> AFAIK, there are no plans to get rid of it due to the bool 
> packing in std.container.Array, so if there's anything that you 
> can do to improve it, go right ahead. Help is welcome.

  Well so far the biggest problem I have is trying to make 
const-friendly slice(s). Also minor issues with the built-in 
core.bitop functions as they accept size_t and not long, so 
beyond having to include my own versions everything else seems to 
be happy and passes. I wouldn't say it's cleaner, but should be 
an improvement.

  One functionality I fully removed was the subtract operator. 
Honestly it makes no sense; you may as well use xor. Originally I 
updated it to use ubyte rather than size_t, however seeing as 
there would be a big speed drop I ended up reverting it 
afterwards.

  I'm not sure about merging it into GitHub, I'd prefer to have 
someone glance it over and give it a try before adding it back 
into the standard library.


More information about the Digitalmars-d-learn mailing list