Dave Peticolas <[EMAIL PROTECTED]> writes:

> Rob, can you explain the intended uses for guile in gnucash?  I.e.,
> if we wanted to contribute new functionality to gnucash, should we
> write it in guile, not C?

Well, to some extent it's up to you.

I would write things that might be useful for the (motivated and
clueful) user/coder to to play with, enhance, or modify for their own
purposes in scheme, and I would write things in C where performance or
implementation issues make writing them in guile difficult or
impossible (like the engine, or some of the GUI work).  The rest is a
judgement call.

For example, I've worked on the menuing system on the guile side
because eventually, I'd really like to see all the menus built at
startup time from scheme level calls made using a complete enough
interface that the user can put similar code in their
~/.gnucash/config.user to completely customize the menus to their
taste (with as much or as little change as they like).

On the other hand, I wouldn't dream of converting any of the engine
code (other than perhaps adding some useful guile level callback
hooks) to scheme, at least not unless I was planning to go whole hog
and redo it all, and I'd only be likely to seriously consider a
complete reimplementation if I'd been smoking too much crack.

And if I had also done some extremely careful analysis to prove to
myself that the scheme implementation I was using (probably for this,
it'd have to be stalin) was going to end up with comparable
performance to the current C code.  This unequivocally falls in the
"we've got better things to do right now category".

In any case, just so you have an idea of how I look at this issue, my
ideal GnuCash would just be a guile application, and it would call
suitable C functions, via g-wrap or similar, to interface with the
engine and gui.  In other words, I'd have most everything that didn't
have to be in C in scheme.  However, I'm only one programmer, this is
a big project, and others probably have a different vision, so it's
likely we'll end up in the middle somewhere.

> There seems to be both guile and C code for importing QIF files.  Is
> one of them going to be removed?

If that's the guile code that Christopher (I think it was) was working
on just before the server went down, then it's intended to be much
more complete than the current C code, but I don't know if it's
finished.  In the long run, I'd rather see the QIF importing code done
in scheme, and I'd like us to add a plug-in architecture where you can
add import/export filters by just whipping up the right scheme file
and dropping it in the right directory.  This isn't all that hard to
accomodate, and it would make it easy to work on/add/improve the
import/export options.

Hope this helps.

-- 
Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930

--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]

Reply via email to