guile-devel
[Top][All Lists]
Advanced

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

Re: [patch] subordinate SMOBs with GOOPS superclasses


From: Clinton Ebadi
Subject: Re: [patch] subordinate SMOBs with GOOPS superclasses
Date: Wed, 12 Dec 2007 15:38:03 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Neil Jerram <address@hidden> writes:

> address@hidden (Ludovic Courtès) writes:
>
>> Hi Andreas,
>>
>> Andreas Rottmann <address@hidden> writes:
>>
>>> You should probably also have a look at the Scheme-Level FFI of PLT
>>> Scheme[1], and my reimplementation for Scheme 48[2].
>>
>> Thanks for the links, that's the kind of think I had in mind.  Perhaps
>> you'd like to port S42 to Guile as well?  :-)
>
> From a _very_ quick look, my impression is that the PLT FFI is about
> equivalent in complexity and function to what the code generation side
> of G-Wrap provides.
>
> If that's correct, then the key practical difference is that G-Wrap
> does everything at build/compile time, where PLT FFI does everything
> at runtime -- in which case, surely G-Wrap is the better option?

I think doing things at runtime is a better idea--it fits more with
the interactive compile-one-expression-at-a-time nature of Lisp. 

UFFI and CFFI in the Common Lisp world work this way, and generally
bindings to C libraries are solid. There may be an increased risk of
crashing the system during the initial development stage, but once
speced out the data type specifications rarely change. Any strange
issues that occur when interfacing with C this way should also be
trappable and transformed into a Guile exception that could be caught
and not abort the entire system. At least in SBCL it takes a lot of
abuse before a C library can crash anything.

Perhaps G-Wrap could be modified to work at runtime? A few utilities
from it would be of general use--e.g. the sublanguage for specifying
the layout of C structs could be used for generating high level
interfaces to network protocols without painful manual munging or
resorting to C.

-- 
          Who will tend the garden when the snake swallows the light?          
         Who will eat the decay when the worms have lost their sight?          
           Who will rape the weak when there's nothing left to gain?           
             Who will till the soil of these barren black remains?             




reply via email to

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