From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: FFI supports callbacks
Date: Mon, 06 Sep 2010 14:04:22 +0200 [thread overview]
Message-ID: <m3pqwrjcxl.fsf@unquote.localdomain> (raw)
In-Reply-To: <87k4n0w7it.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sun, 05 Sep 2010 17:10:34 +0200")
Greets,
On Sun 05 Sep 2010 17:10, ludo@gnu.org (Ludovic Courtès) writes:
> ludo@gnu.org (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.
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2010-09-06 12:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 14:30 FFI supports callbacks Ludovic Courtès
2010-09-03 16:51 ` Andy Wingo
2010-09-03 17:27 ` Ludovic Courtès
2010-09-05 15:10 ` Ludovic Courtès
2010-09-05 22:23 ` Jose A. Ortega Ruiz
2010-09-06 12:06 ` Andy Wingo
2010-09-07 0:30 ` Jose A. Ortega Ruiz
2010-09-07 7:38 ` Tristan Colgate
2010-09-07 12:56 ` Ludovic Courtès
2010-09-07 21:01 ` Andy Wingo
2010-09-06 12:32 ` Ludovic Courtès
2010-09-06 12:04 ` Andy Wingo [this message]
2010-09-08 16:21 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3pqwrjcxl.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).