On Tuesday, March 11, 2003, at 06:51 AM, Peter Romianowski wrote:


I don't think FP would break existing templates if implemented with

Unfortunately it does. #set ($foo = 5 / 2) will result in $foo being 2.5 instead of 2.

Well.... Try this :


System.out.println(5/2);


care (although I don't see myself the necessity for them); but I just
*cringe* at the idea of balooning the numeric types to
BigInteger/BigDecimal's. It's just megaton-scale overkill.

As said some times now: The final version will *of course* not use BigInteger / BigDecimal for every operation. That'd be total overkill! I just implemented the *first* version this way, because it was quick to do and would deliver the most precise results. These results can be achived with some if-Statements too and that will be done for a final version (of course, again). My focus has been on correctness rather than speed for the first version.

I'd say that any application sensitive enough to overflow to care
should implement careful (pardon the redundancy) business
logic outside

That's for sure! But I really don't see why something like displaying
a progress bar ("10.23 % finished") would require any business logic.
Other things like displaying a total price should go into the business
logic or controller, since there might be rounding issues. For my everyday
use I find enough cases where I simply need numbers or the possibilities
to compare floats. BTW, most people forget that with full number support
you get short, byte and long-support too. I cannot count the number of
workarounds I had to implement because my business logic must use longs :)

I keep going round and round in my head about this. I keep wondering if there is a clean way to introduce this w/o breaking templates.


geir

--
Geir Magnusson Jr                                   203-956-2604(w)
Adeptra, Inc.                                       203-434-2093(m)
[EMAIL PROTECTED]                                   203-247-1713(m)


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to