Clark Jones writes:
> A thought has occurred to me: A possible solution would be to "migrate"
> to C++ (not a humongous project, since a quick look through a "tar -tvzf"
> of a source-tarball reveals that it's mostly in C) and then use C++'s
> ability to "overload" the normal operators to, in essence, construct
> "custom fixed-point data types".
>
It's a good thought, and the use of C++ operator overloading is
convenient for this kind of thing, but there is a rather large
problem.
You may have noticed on the way through that we use Scheme for a
substantial amount of our functionality, and that we use a tool called
g-wrap to make the C functions available through Scheme. Wrapping
C++, particularly when we will have to use C++ classes and overloading,
would get rather ugly, to say the least. The pain of having to write
gnc_money_plus(x, y, z) rather than x = y + z will be relatively
small by comparison, I believe. In fact, as most of the actual
calculations are going to be performed in Scheme (the reports are all
in scheme) the nastyness of using (as distinct from implementing)
gnc_money_plus isn't really all that nasty.
However, if we can't find a C library for doing this that meets our
needs, turning fixpoint arithmetic code that we write
into a library that could be used for other applications is worth
some careful consideration.
------------------------------------------------------------
Robert Merkel [EMAIL PROTECTED]
------------------------------------------------------------
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]