Implementing proper cost basis tracking for shares

Rob Browning rlb@cs.utexas.edu
30 Oct 2000 08:40:46 -0600


Robert Graham Merkel <rgmerk@mira.net> writes:

>  > I don't really know how much flexibility we'd want to allow initially,
>  > but changing the internals at some point might make accomodating
>  > various different schemes easier.
>  > 
> I dunno if you saw the discussion I was having on the list a while ago
> about being able to do this, but only for reports.  If we generalised that to
> *everything*, it would be an interesting possibility :)

If we did this, I'd probably want to make the flat account list a
GList or a GArray, and make the "views" into it, a GList (or GSList)
of GLists (or GSLists) which "bottoms out" in Account*'s.

Seem's pretty straightforward, though I believe the point we stalled
at last time was, given this setup, what do account names mean?  Right
now, the full-name is an implicit part of the Group path used to reach
it, but in this "new" approach, an account might appear in a variety
of arrangements.  I think the right answer is that the Account name
would need to be more descriptive, and probably enforced unique,
something like "MegaBank Savings" rather than just "Savings".

Switching to the "flat list" approach would probably be more database
friendly, and it would simplify code that just needs to traverse all
the accounts...

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930