> In any case, I agree with the general model of:
>
> * Memory: some chunk of contiguous memory somewhere;
> * MemoryRegion: some reference to { Memory, offset, length }
> * String: a MemoryRegion and some routines to manipulate itI'm unconvinced. What's the purpose of a MemoryRegion if you can't manipulate it? In C, it makes sense to provide different API: strings provide different semantics than char* (they're null-terminated). But here? Everything is bounds-safe or it's not worth the effort. NULL-termination is optional and only used when exporting the underlying data.. I'm being very pragmatic here: if it behaves like a string, it is a string, despite the fact that it might actually be a buffer, or a blob. -- /kinkie
