This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gh and SMOBS [was Re: guile: going the way of DEATH]



I asked a similar question about gh_ and wrapping new types a couple
of years ago.  Back then, Aubrey Jaffer suggested that as long as gh_
was meant to be portable between Scheme implementations, there wasn't
really a guaranteed good portable way to use a C interface to export C
types to Scheme.  He suggested that a Scheme program reading a
description of the types to be exported and then writing the necessary
low-level wrapping code was the proper way to go so that the low-level
details could be handled appropriately for each interpreter.  So
that's when I wrote G-Wrap.  This code-generation approach was also
used independently by Marius Vollmer when he wrote his wrapping
mechanism for guile-gtk/gnome-guile.

SMOBS may still be generated at the scm_ level as before, but maybe we
should keep gh_ portable and not try wrap C types there.

I do think it is worth keeping the gh_ level portable, as the Guile
implementation seems better suited to some applications than others
(I've even used my own experimental miniature modular real-time Scheme
implementation for some robotics stuff at times and prefer it for
stuff like video-games etc... where I want total control of GC timing
and all signals), and I would like to be able to swap underlying
Scheme implementations in the future as I wish.  The Gh_ level and
code generation as needed seems to be the way to do this and I
definitely don't want that broken.

-- 
Christopher Lee
http://www.cs.cmu.edu/~chrislee
chrislee@ri.cmu.edu