guile-devel
[Top][All Lists]
Advanced

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

Re: FFI supports callbacks


From: Ludovic Courtès
Subject: Re: FFI supports callbacks
Date: Wed, 08 Sep 2010 18:21:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi,

Andy Wingo <address@hidden> writes:

> On Sun 05 Sep 2010 17:10, address@hidden (Ludovic Courtès) writes:
>
>> address@hidden (Ludovic Courtès) writes:
>>
>>> BTW, while we’re at it, how about make-foreign-function => 
>>> pointer->procedure?
>>
>> We briefly discussed this on IRC.  One issue with the
>> ‘pointer->procedure’ name is that ‘->’ procedures are most of the time
>> one-argument procedures, whereas ‘make-foreign-function’ has 3 mandatory
>> arguments.
>>
>> However, it occurred to me that what confuses me most about
>> ‘make-foreign-function’ is that it actually makes a Scheme procedure out
>> of a foreign function.
>>
>> Conversely, ‘procedure->pointer’ really makes a foreign function out of
>> a Scheme procedure.
>>
>> In addition, I like the idea of having names that show the symmetry of
>> these two procedures.
>>
>> So, what do you think?  :-)
>
> I guess I'm OK with it. The new names do convey the types better to the
> programmer. I'm hesitant regarding "pointer" though; the name is just so
> general. I guess I prefer "machine-pointer" or something. But I would
> also be OK with the change as you propose it.

I committed the change yesterday.

Thanks,
Ludo’.




reply via email to

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