lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Dirk Laurie <dpl@sun.ac.za> wrote:
>
> I can see a possible need for two kinds of byte arrays:
>     1. Mutable strings, with operations rather like the string
>         library but modifying the string in-place rather than
>         returning a new string.
>     2. Arbitrary length bit patterns, with operations rather
>         like the bit32 library but not restricted to 32 bits.

Anyone who does something like JavaScript typed byte arrays should also
look at Erlang's bit syntax (though it deals with immutable blobs more
like Lua strings).
http://www.erlang.org/doc/programming_examples/bit_syntax.html

The bit library functions should probably operate polymorphically on
strings and numbers.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Forties, Cromarty, Forth, Tyne, Dogger: Variable, becoming southeast, 3 or 4,
occasionally 5 later in Tyne. Slight or moderate. Mainly fair, rain for a time
in Forties and Dogger. Moderate or good.