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: Guile and Swig
Date: Sat, 20 Apr 2013 15:51:16 +0200	[thread overview]
Message-ID: <87haj19up7.fsf@gnu.org> (raw)
In-Reply-To: 87li8hsp2w.fsf@gnu.org

Hi!

Dmitry Bogatov <KAction@gnu.org> skribis:

> Is using SWIG[1] is endorsed for writing Guile wrappers to C library? I
> make such bindings for libircclient[2] for my project, but it would be
> nice, if it would find way to official Guile tree.  Are here some
> guidelines about it?

As Daniel noted, this may not be a good idea these days.  Besides, Guile
2.0 comes with two nice ways to write bindings: the FFI in the (system
foreign) module, and its C API.  It’s not automatic, but it many cases
you may be able to come up with some level of project-specific
automation on top of these.

> Also, question of style of Lisp code. It seems, that most common style
> is `(action object arg1 ...)` and I find making object callable is more
> elegant: `(object #:action arg1 ...)`. Is it discouraged?

I’ve never seen that second style in Scheme or even Lisp code.

Even GOOPS, Guile’s object oriented layer, which derives from CLOS
(Common Lisp’s), uses the first style.

Ludo’.




  parent reply	other threads:[~2013-04-20 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  5:28 Guile and Swig Dmitry Bogatov
2013-04-19  0:06 ` Daniel Hartwig
2013-04-19  6:15   ` Guile lisp code style (was: [guile] Re: Guile and Swig) Dmitry Bogatov
2013-04-19  7:46     ` Daniel Hartwig
2013-04-20 13:51 ` Ludovic Courtès [this message]
2013-04-21  6:45   ` Guile and Swig Ian Price

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=87haj19up7.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).