Proposal for modifying gnucash to use exact quantities

Richard Wackerbarth
Fri, 28 Jul 2000 13:19:15 -0500

On Fri, 28 Jul 2000, Jon Trowbridge wrote:
> On Fri, Jul 28, 2000 at 12:24:53PM -0500, Richard Wackerbarth wrote:
> > All you need to do that is switch to some form of integer amounts of SCU.
> > and associate a formatting routine to display the result in a different
> > unit.
> Let's assume for the moment that Bill's proposal is fundamentally
> wrong for the task at hand, but that it gets implemented anyway.
> One thing that will come out of this is that all of the "financial
> math" in GnuCash will be changed from regular C-math (a = b+c) to
> Bill's-API-math (a = gnc_sum(b,c), or whatever).

> In theory, this means that whether or not rationals or integer amounts
> of SCU are used becomes an implementation detail, that would hopefully
> be hidden behind the API.

Unfortunately, Bill's API still exposes some of the detail. This is one of 
the objections that I have to it. A cleaner API would completely hide the 
implementational details.

Other than that, the changes that Bill will make for his API will, IMHO, 
mostly have to be redone to meet the simpler API. I'm not sure that his 
changes get us any closer. In many respects, they are a tangent. One good 
thing is that he will have created function calls that can be located by 
"grep" to determine where to make the changes.

Another objection is that his API does not clearly distinguish between 
quantities and ratios. This may lead to some less than obvious hazardous code