At 06:15 PM 12/27/00 -0500, Uri Guttman wrote:
> >>>>> "DC" == Daniel Chetlin <[EMAIL PROTECTED]> writes:
>
> DC> Which of these two behaviors do you find more useful:
>
> DC> [~] $ perl -le'$c=1;$c*=$_ for (2..170);print $c'
> DC> 7.25741561530799e+306
> DC> [~] $ perl -le'$c=1;$c*=$_ for (2..171);print $c'
> DC> inf
>
>i am not worried about those conditions. it is just a case of specifying
>things cleanly. if the default is overflow to bigint, then how would you
>get back to regular ints? or go between int and float? it just isn't
>clear to me but then i can be very foggy.
I'd like bigints to drop back to ints when they get small enough, but I'm
not sure about the cost. Then again, given how pricey bigint math is, it's
likely not much extra. As for the rest, perl should autoconvert as needed,
unless a variable is pegged to be only one type. (Which is to say it should
all be transparent, though specifying what and when's OK with me)
> DC> Oh, and in case you're wondering, both of the Ruby commands are *fast*.
> DC> As compared to our core module, Math::BigInt, which is slower than
> DC> molasses even after you bother to `use' it, deal with the
> interface, and
> DC> do things by hand.
>
>that just means we need a better bigint implementation then the perl5
>module (maybe we could steal ruby's? :). and i agree it should be
>tightly integrated in the core with the vtable stuff. it is just the
>semantics of overflow and conversion that are not well specified
>IMO. this is the kind of thing that should have been fought out in the
>rfc wars. :)
Well, nobody thought about it, and in the perl 5 style it's rightly in the
'implementation defined' area. Which is where we are now. :)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk