ons 2008-08-27 klockan 11:10 +0200 skrev Kinkie:

> I'm unconvinced. What's the purpose of a MemoryRegion if you can't
> manipulate it?

You can manipulate it, but at a rather low level. You can also append to
it by adding a MemoryRegion (or String), you can access raw octets. But
you can't do any fancier string family operations such as tokenising
based on separators, case-insensitive compare, substring search, etc...

a MemoryRegion is binary data.

a String is character data.

> 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..

Strings have character properties. MemoryRegions not.

Regards
Henrik

Reply via email to