Hi,

Andy Wingo <wi...@pobox.com> skribis:

> On Sat 09 Jun 2012 17:16, Thien-Thi Nguyen <t...@gnuvola.org> writes:
>
>> If you want to make a case for such a facility, why not
>> show some code, both without (status quo) and with (proposed)?
>> It should be clear what expressiveness is gained, and how.
>
> For example, let's say I mmap a big file.
>
>   (define x (mmap-file "/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.13.so"))
>
> I did some computation and have figured out that there is a region of
> interest between bytes 121241 and 121263 that interests me.  I would
> like to be able to pass off that region to some other piece of code,
> without giving it access to the entire bytevector.  I would also like to
> be able to pass around  

What about using copying (or rather, copy-on-write) sub-bytevectors to
start with?  That would avoid the aliasing issue; OTOH COW would make
the implementation more complex.

Thanks,
Ludo’.


Reply via email to