Yes, I've always why ResizableBooleanArray extends FixedBooleanArray and
why
FixedBooleanArray is not simply a special case of ResizableBooleanArray.


Because a FixedBooleanArray is simpler, so that it may use less memory and
be implemented more efficiently I suppose.


Is there a real difference between boolean arrays, big integers and
binary data?
Are the above really different from a STRING ?
If not they could become the same thing, or at least share a common
implementation.


I don't know for the fixed one, because it's so simple that you do not need
a backend.
But I suppose that String and the Resizable could use a common vector
implementation.

Of course it would be nice to have all the bitwise and arithmetic
methods available.
Can the C-code of the Perl5 Module Bit::Vector reused for that?


I suppose it could.  It comes with the same Licences as Perl (Artistic, GPL
and LGPL) so I guess there's no problem at this level.
I believe that Bigints already use an external library if available :
libGMP. Is there a particular reason not to include it in the parrot
distribution.
Any Licensing or portability issues ?


The only problem I see is that if we don't add other methods to
ResizableBooleanArray, it would be overkill just using the BitVector library

to store an array, and maybe difficult to debug.
See the list of functions it provides :

Version()                Word_Bits()              Long_Bits()
new()                    new_Hex()                new_Bin()
new_Dec()                new_Enum()               Shadow()
Clone()                  Concat()                 Concat_List()
Size()                   Resize()                 Copy()
Empty()                  Fill()                   Flip()
Primes()                 Reverse()                Interval_Empty()
Interval_Fill()          Interval_Flip()          Interval_Reverse()
Interval_Scan_inc()      Interval_Scan_dec()      Interval_Copy()
Interval_Substitute()    is_empty()               is_full()
equal()                  Lexicompare()            Compare()
to_Hex()                 from_Hex()               to_Bin()
from_Bin()               to_Dec()                 from_Dec()
to_Enum()                from_Enum()              Bit_Off()
Bit_On()                 bit_flip()               bit_test()
Bit_Copy()               LSB()                    MSB()
lsb()                    msb()                    rotate_left()
rotate_right()           shift_left()             shift_right()
Move_Left()              Move_Right()             Insert()
Delete()                 increment()              decrement()
inc()                    dec()                    add()
subtract()               Negate()                 Absolute()
Sign()                   Multiply()               Divide()
GCD()                    Power()                  Block_Store()
Block_Read()             Word_Size()              Word_Store()
Word_Read()              Word_List_Store()        Word_List_Read()
Word_Insert()            Word_Delete()            Chunk_Store()
Chunk_Read()             Chunk_List_Store()       Chunk_List_Read()
Index_List_Remove()      Index_List_Store()       Index_List_Read()
Union()                  Intersection()           Difference()
ExclusiveOr()            Complement()             subset()
Norm()                   Min()                    Max()
Multiplication()         Product()                Closure()
Transpose()

Reply via email to