> $x = 2^1000;
> 
> would evaluate 2^1000 at compile time, and if it didnt fit into an NV
> (or IV if 'use integer' is in effect), create a compile-time error.

For the record: I hate the current policy of defaulting to NVs for
arithmetic ops.  If I say '2' I do mean an IV of 2, not an NV of
2.000000000000000.  Currently if I say

  $a = 2;
  $b = 3;
  $c = $a + $3;

the $c will be an NV of of 5.000000000000000, or thereabouts, een
while $a and $b are IVs.  I think one should stay within one
type/class of numbers for as long as possible.  Similarly for literals:
if I say

  $x = 
10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376;

I would prefer getting a bigint, not an NV.  I am happy with requiring a

  use bigint;

for this to happen, though.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Reply via email to