unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: FFI supports callbacks
Date: Sun, 05 Sep 2010 17:10:34 +0200	[thread overview]
Message-ID: <87k4n0w7it.fsf@gnu.org> (raw)
In-Reply-To: 87k4n2hh5j.fsf@gnu.org

Hi there!

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’m also open to different names that aren’t confusing and show the
symmetry.)

Thanks,
Ludo’.




  reply	other threads:[~2010-09-05 15:10 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 [this message]
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
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=87k4n0w7it.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@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).