CVS update: gnucash/src/engine
linas@linas.org
linas@linas.org
Fri, 9 Mar 2001 16:29:12 -0600 (CST)
Hi Jim,
>
> Modified Files:
> Account.c
> Log Message:
> James LewisMoss's patch.
>
> Couple of extract out common code. One remove cruftiness. One
> reorder changelog.
This patch caught my eye; I have a couple of questions:
-- you seem to replace occurences of s->acc (a zero or 1-cycle lookup)
with xaccSplitGetAccount() (a rather expensive subroutine call,
stack frame purchase, etc.) Why? It doesn't seem to serve any
purpose that I could make out, while bloating the performance.
I'm concerned; I'm trying to bite my tongue about excessive
encapsulation & the downfall of OO-style programming ...
-- why is the account guid being stored in the split? Isn't this
another source of trouble (i.e. what happens when the account
pointer and the account guid get out of sync? These types
of bugs get hard to find and fix ... necessitating the
above work-around ... isn't this leading down an evil path?)
Maybe I'm nit-picking, but both changes run against the grain
of what I know to be true ...
--linas