On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby <[EMAIL PROTECTED]> wrote: > Decimal implemented as a library would be sufficient for a 3.1 > release. The problem is an interoperable definition for what infix > operators is required for completeness. Taking no other action, the > default behavior for the result of a "+" operator given a Number and a > library provided Decimal would be to convert both to string > representations and concatenate the results.
In other words, the same as the "+" operator given a Number and a library provided Employee, Document, PopupWidget, ..., or any other user defined type. > This was discussed at the last ECMA TC39 meeting in Oslo, and was > found to be unusable and would create a backwards compatibility issue > for Harmony. With respect, I wonder what these would be. It seems that the fail-fast behavior in this case is useful for (as I pointed out) stuff like helping establish Sarbanes-Oxley compliance. I understand that such requirements are why we need decimal arithmetic in the first place. > ... spec'ing the operators would not be all that difficult. ... there > are some usability concerns relating to mixed mode operations > that we need to work through. It is precisely these concerns that cause me to wonder if there's a foundational issue here. Are decimals indeed a different enough beast, and the pitfalls subtle enough (even if they can be specified completely), that mixed mode should simply not be supported (i.e., made to fail-fast in some backwards compatible way)? And if mixed mode is not supported, does that mean the library approach is adequate? Ihab -- Ihab A.B. Awad, Palo Alto, CA _______________________________________________ Es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

