guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: array handles and non-local exits


From: Neil Jerram
Subject: Re: array handles and non-local exits
Date: Sun, 19 Jul 2009 21:04:49 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hey,
>
> Andy Wingo <address@hidden> writes:
>
> [...]
>
>> You can't just write functions that return values, you have to contort
>> code to store temporaries and then release and then return. You have
>> to write paired statements. If you call a user function, you really
>> should set up a dynwind, which conses, and contorts your code even
>> further.
>
> Right, that one has to set up a dynwind for nothing sucks.
>
>> Array_handle_release is a bad idea.
>
> Fair enough.

FWIW, I agree (I think with both of you) that `we might need it in
future' is not a good argument, but that API compatibility is.

> The doc would need to be revised (again).
>
> (It would have helped in this discussion if we knew the rationale for
> this API.  I couldn't find any trace of discussions around it.)

I'm pretty sure it was about allowing C code to efficiently access and
modify uniform vector contents, but at the same time supporting
operations which might require the underlying storage to be
reallocated.

The latter operations could include enlarging an existing vector, or
copy-on-write.  But AFAICT we never implemented either of those ideas,
and the existing code never changes the underlying storage of a
vector.

Regards,
        Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]