guile-user
[Top][All Lists]
Advanced

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

Re: To gh_ or not to gh_?


From: Neil Jerram
Subject: Re: To gh_ or not to gh_?
Date: 04 May 2001 23:41:29 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Sam" == Sam Tregar <address@hidden> writes:

    Sam> Hey guys.  I'm working on a Perl interface to Guile called
    Sam> Inline::Guile.  I've read through all the available
    Sam> documentation and I'm still not sure where to start.  The
    Sam> work-in-progress docs strongly recommend the gh_ functions
    Sam> but most of the available examples use the scm_ functions and
    Sam> macros.

Funny you should ask just now - the guile-devel mailing list is in the
middle of a discussion on exactly this question.  I don't think we've
quite reached a consensus yet; you may want to check out the arguments
for yourself.

    Sam> Suggestions?

It depends what kind of extension you are writing.  GH only meets the
needs of a very simple class of extensions, namely those where all you
want to do is

- define some new primitives

- then either enter a REPL or evaluate Scheme expressions from time to
  time

- and where the primitives are limited to dealing with basic data
  types (numbers, strings, vectors and list structure) -- i.e. no
  SMOBs.

Right now, if you want to do more than this, you have to use the scm_
interface.

My personal view is that GH suffers from lack of clear purpose and
isn't really needed, since most of the scm_ interface is equally
portable and stable; so I'd go for scm_.

        Neil




reply via email to

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