> I had a long ranty email with lots of points, but I'll summarise and
> save y'all the trouble.

Thanks, I appreciate that.

> A memory region can be manipulated (passed into vector IO, modified
> with COW or not semantics, etc). Its just an array of bytes.
>
> A string includes things like potentially caring about character
> encoding in things like length calculations, comparisons, etc. A
> memory region doesn't. A string is generally a representation of
> printable data; a memory region isn't.
>
> A string gets the benefits of a memory region (reference counting,
> vectorised IO, etc) and just adds functionality on top of it.
>
> Would you use a "String" as the reference counted type for say, the
> memory store?

NOW I get the point :)
To me a String is just an abstraction of a refcounted char*: it
doesn't care about encodings etc.
This is the cause of the whole misunderstanding: my implementation of
a String is not a string at all, but more like a string-friendly blob,
suited for low-level stuff such as for instance the memory store.

Any suggestions for how should I rename the class? Would MemBlob sound
good to everyone (let's keep it short, please)..


-- 
 /kinkie

Reply via email to