On Thursday, March 13, 2003, at 06:45 PM, Nathan Bubna wrote:
How would you test wholeness? Would you test after each operation, or after the entire expression tree is evaluated? What about performance?
these are implementation questions. a very related, but nontheless
different subject. and, being something of a hypocrite and goober, i don't
plan on implementing these features myself (at least not any time soon. i
have other priorities.) and thus have not thought things through that far.
as such, feel free to dismiss my opinion if you feel so inclined.
I'm deeply sorry if I came across as challenging. I didn't mean that, and I apologize.
Well, then there is an alternative: Use Double arithmetic throughout,
and convert Doubles to their decimal representation using the minimum
quantity of digits needed to make the round-trip conversion idempotent.
This is what ecvt() does in C. To put it differently, operate on
doubles, but instead of calling toString() when instantiating the
references, call something else that makes 2.0 appear as "2" and
2.4999999995 appear as "3.5" and so forth.
Easy, simple, no run-time penalties on expressions.
eh... didn't totally follow that. idempotent... where are my old math textbooks these days?
What I mean was that Double.parse((new Wrapper(x)).toString()) == x for all Double x.
hmm. "calling toString() when instantiating the references"... do you mean rendering the references?
Yes, that's what I meant.
if so, i don't know
enough about velocity's guts yet to know if it's setup to render via
anything but toString(), but it sounds hackish... it'd be better even to
create our own number wrapper with a toString() that does what you describe.
but even then... i'm not sure if that's a good way to go. eh, i'll leave
these implementation questions to those who'll implement. in the meantime,
i'll stick to theory and big picture stuff on this issue. :-/
Fair enough. What I'm concerned over is that there is much interest in VTL behaving "the right way" in this issue but not much is said about implementing that behavior "the right way", too. I begin to think that there's more than one way to skin a cat; we (you) could start by defining precisely what we would like to see in VTL and then thinking how to do it.
Regards, Mat�as.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
