On Fri, 30 Jun 2000, Christopher Browne wrote:
> Come on, people. The issue is _not_ what "object system" is being
> used, or what language is being used, but rather _what the numeric
> representation should be_.
To a large extent, I agree.
> C and C++ have the _same_ basic sets of basic data types; any money
> representation that is expressible in C++ is equally expressible in C.
> Moving to C++ does not magically add in a horde of new numeric data types.
Some languages make it easier to define and manipulate structured data,
particularly when there are multiple variants of that data, but the
fundamental representation is equivalent.
> If you have ideas on a _data type_, then by all means speak up.
I don't think that we should have ** A ** data type. The code needs to be
written is such a manner that we can change the representation and affect
ONLY the "operator" (aka methods, etc) implementation.
> Suggesting mere syntactic sugar misses the point of the exercise, which
> is a _DATA TYPE_.
I suggest:
struct {
currency *denomination;
monetary_value_t amount;
} generic_money;
struct {
char curr[3]; /* Currency Name */
char currency_symbol;
monetary_value_t unity;
...
various proc* to implement money --> display string, etc.
} currency;
struct {
SQL_money value;
} monetary_value;
or
struct {
gint64 value;
} monetary_value;
or
struct {
CORBA_whatever value;
} monetary_value;
or ...
as may be appropriate
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]