code in cvs is broken
Rob Browning
rlb@defaultvalue.org
Fri, 16 Nov 2001 15:29:53 -0600
linas@linas.org (Linas Vepstas) writes:
> There doesn't seem to be any strong technical reason for a call-back
> design between c and scm in gnucash; in most cases, it seems that it
> would be just as easy/quick/efficient to use scheme to push data into
> the c code. Right?
In general I agree that simpler is better, and and so I might often
side with you on this one, but I'm not certain enough about our needs
ATM to be sure that calling from C to scheme won't ever be the best
answer to a given problem. In fact, we already call from C to scheme
quite a bit, and I suspect there will continue to be many cases where
doing so is the most appropriate solution.
As a particular concrete example, consider the GTK code. Until and
unless we end up handling all our gnome manipulations via gnome-guile,
whenever you want a graphic element to invoke a scheme function,
directly, or indirectly, then there's probably going to be a call from
the C side to the scheme side.
> Recall: the reason we had C code invoking guile was because the
> gnucash main loop was in C. But now that it will be in scheme,
> the proximate cause will be gone.
Also, with the newer guile, there will be no need for gh_enter, you
will be able to use scm_init_guile and leave your "main" alone. This
will likely be a boon for wrapper writers.
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD