develooper Front page | perl.perl5.porters | Postings from November 2008

Re: [perl #969] [PATCH] Draft: shifting of bitvecs considered broken

Thread Previous | Thread Next
From:
Vincent Pit
Date:
November 17, 2008 05:23
Subject:
Re: [perl #969] [PATCH] Draft: shifting of bitvecs considered broken
Message ID:
48161.147.210.17.175.1226928437.squirrel@147.210.17.175
> Instead of focussing on just these two shift operations I wonder if an
> analogy with arrays of bits, or strings of bits, could be developed into a
> more general interface. Like a splicebits() analogous with splice() or
> subbits() analogous with substr().
>
> With more specialized functions implemented, or at least specified, in
> terms of the general one.
>
> Just a thought.
>
> Tim.
>

I concur. When I was writing Scalar::Vec::Util, I felt like the atomic
operation for vec strings really was the copy of bits, from an arbitrary
position to another. Shifting, unshifting, splicing and such then seem to
be more or less compositions of those.

Vincent.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About