What have I missed?

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 7 07:24:12 PDT 2014


On 8/6/14, 6:40 PM, Era Scarecrow wrote:
> When I re-wrote the BitArray I personally think it is an improvement in
> many ways, and being a re-write you can't just do bug #xxxx and then bug
> #xxxx and then bug... etc etc.

Welcome back!

Regarding BitArray, when I implemented HeapBlock in 
https://github.com/andralex/phobos/blob/allocator/std/allocator.d I 
needed a way to "see" a ulong[] as an array of bits, with primitives 
such as "find a run of at least n zeros" and "set n bit to zero or one" 
etc. A "bit range" abstraction built on top of a ulong[] would have been 
quite useful. It would have the classic range primitives but also 
functions specific to runs of bits, which are unique to it.

I wanted to sit down and extract the abstraction at some point, but 
didn't get to it yet. Sounds like a great thing to include in std.bitmanip.


Andrei



More information about the Digitalmars-d mailing list