code in cvs is broken

Linas Vepstas linas@linas.org
Wed, 14 Nov 2001 17:52:14 -0600


On Wed, Nov 14, 2001 at 07:57:14AM -0600, Bill Gribble was heard to remark:
> 
> That means libgncgnome.la has to be built before libgw-gnc.la. However,
> top-level.c included gw-gnc.h, meaning that libgw-gnc.la has to be built
> before libgncgnome.la.... AAAH!

Well, one way out of circular dependencies would be to declare that 
C code never calls scm routines.  That everything 'dead-ends' on C
libraries.  If we need to initialize the C libraries, then we should
'push' data into them (from scm), rather than using C/libguile to 
'pull' from scm.

For example: libgncengine needs to be initialized with currency info.
Currently, it 'pulls' the currency info out of scm code.  I think it
would be cleaner to instead make a declaration 'yea verily the engine
must be initialized with currency data before being used', and then
use scm code to push that data into the engine.

The benefit of this, at least for the engine, is to enable perl & java
bindings to the engine (which currently are messed up because both 
guile and perl want to 'own' the main loop.)

Other benefits are debatable, I supose.  I like it because it has a
certain 'traditional' feel too it; it avoids a spaghetti of flow of
control.   The philosophy keeps the C code 'stupid', (as C code tends 
to be), and leaves all the 'brains' in the over-seeing scm.  I think
this makes debugging easier, since its clearer as to who is responsible 
for what.  

I would guess there are parallel issues for menu and register layout.
I'd suggest using scm code to 'tell' the C code what the layout should 
be, rather than using libguile in the C code to import data from scm 
config files.  

Does this make sense? Do you feel that this might not be such a good
idea?  Is it a wash?

--linas

-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933