BitArray/BitFields - Review
Jonathan M Davis
jmdavisProg at gmx.com
Sat Jul 28 14:26:53 PDT 2012
On Sunday, July 29, 2012 01:19:49 Dmitry Olshansky wrote:
> On 29-Jul-12 01:07, Jonathan M Davis wrote:
> > On Sunday, July 29, 2012 00:58:59 Dmitry Olshansky wrote:
> >> My solution is make slices different type e.g. BitSlice.
> >> It's always reference to the original BitArray. Array itself still can
> >> be either compact or not. All operations with slice go to array (and
> >> still check if they can use word-aligned speed up).
> >>
> >> How does it sound?
> >
> > I would point out that while hasSlicing doesn't currently check for it, if
> > opSlice doesn't return a type which is assignable to the original range,
> > it
> > won't work in a lot of Phobos functions. I keep meaning to bring that up
> > for discussion in the main newsgroup.
>
> BitArray isn't and shouldn't be a range. It's a container.
> So BitSlice is a range over BitArray. What am I missing?
Probably nothing. I'm not all that familiar with BitArray. If it's not a
range, it's not a problem. I assumed that it was and was just pointing out a
potential problem based on that assumption.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list