Re: If you like "u8vector" ...
Per Bothner 17 May 2005 20:09 UTC
Michael Sperber wrote:
> Yes, that makes sense. However, aren't you really arguing for
> Taylor's idea of having a single type for "blobs" and then having
> access methods for various sequences of bits inside them?
It might be nice - but I haven't seen a specific proposal.
For byte and other uniform vectors random acces is useful.
E.g. floating-point matrix operations.
For parsing a complicated "blob" (either in memory, on disk,
or a network stream) you normally want sequential access,
and being able to mix data types: e.g. a u32 count whose value
is N is followed by N instances of u8, followed by a u64 checksum.
> (I have to
> admit that I'm warming increasingly to this idea.) Otherwise, the
> concept is going to bloat every API that deals with similar objects
> beyond recognition. This way, most of the bloat would be right with
> the "blob API" and stay there. What do you think?
The devil is in the details ...
--
--Per Bothner
xxxxxx@bothner.com http://per.bothner.com/