chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] noobie question about chicken/swig/csi


From: Alex Queiroz
Subject: Re: [Chicken-users] noobie question about chicken/swig/csi
Date: Mon, 2 Apr 2007 14:31:51 -0300

Hallo,

On 4/2/07, Graham Fawcett <address@hidden> wrote:

> I guess there are so many ffi choices because it must be a pain
> to write pure C extensions, judged by what I've seen from chicken's
> output.

No, I don't think it follows that there are many FFI choices because
writing pure C extensions is a pain.


    It was just a thought.


Don't judge the complexity of pure C modules by the scary appearance
of CSC-generated, CPS-mangled C code. Instead, write a pure C module
or two, in a natural style, and find out for yourself that it's not
that hard at all.


    But I still have to sum up the sizes of everything I'm gonna need
to call C_alloca, then to set bit types in the right places of the
allocated memory, the functions have a variable number of arguments
etc., etc.
    I'm not saying that this is a design flaw or something. It's just
that I'm used to write Lua extension modules, and it's even fun! But
of course Lua is only interpreted and was designed from the beginning
to be easily embeddable and extended.
    And chicken has lots of FFI features that ameliorates this
problem if one mixes C and Scheme. It's just a different way of doing
things.

Cheers,
--
-alex




reply via email to

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