guile-user
[Top][All Lists]
Advanced

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

Re: Newbie seeks guiding hands.


From: Martin Grabmueller
Subject: Re: Newbie seeks guiding hands.
Date: Fri, 23 Mar 2001 17:37:38 +0100

> From: Gary Benson <address@hidden>
> Date: Fri, 23 Mar 2001 15:30:27 +0000 (GMT)
> 
> On 23 Mar 2001, Rob Browning wrote:
> 
> > Gary Benson <address@hidden> writes:
> > 
> > > One thing I didn't understand was gnucash's use of namespaces. There
> > > seem to be at least two in use: gnc and gnucash. Do these
> > > differentiate low- and high-level code or something?
> > 
> > Nope.  The gnucash code base is a little messy these days.  This is
> > what you get when one packages lives for a long time, morphing from
> > one project (xacc) into another (gncuash).  There are quite a few
> > inconsistencies in the naming of parts in the code.  From the old xacc
> > C code, most prominent in the engine, we have xaccFooBar.  Newer C
> > code uses gnc_foo_bar, and on the scheme side, we most often use
> > gnc:foo-bar, though once we migrate to using modules, much of that
> > should go away...
> 
> How do modules work? Would they, for instance, allow me to write a
> function called evaluate, safe in the knowledge that it would not conflict
> with functions called evaluate in other parts of the code?

Yes, exactly.  The procedures in different modules live in different
name spaces and do not conflict.  If you want the procedures from a
specific module, you have to import the bindings of that module with
the

(use-modules (module-name))

syntax.

You should have a look at the modules in the directory

/usr/local/share/guile/<version>/ice-9

and see how it works.

Regards,
  'martin



reply via email to

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