On Tue, Aug 10, 2004 at 01:43:37PM +0200, Leopold Toetsch wrote:
: We need offical PDDs about the behavior of our PMCs. I hope that Perl6 
: types will be the same as Perl5 types.

Well, assuming that Perl 6 is like Perl 5 is often a good first
approximation, but in this case we're thinking that Ints (but not
ints) promote to arbitrary size.  We don't think of it as promoting to
BigInt, but rather simply that the Int type doesn't have an arbitrary
size limitation.  In essence, we think of it the other way around:
Int *is* BigInt, but optimized to use a fast representation for
small integers.  You'd use "int" if you want fast integers limited
to the natural integer size of the current machine, and then the
P6 compiler is free to use integer registers rather than PMCs.
Untyped variables are assumed to store an Int PMC rather than an int,
though the optimizer might be able to demote some Ints to int, of course,
given sufficiently aggressive optimization flags.

Anyway, that's the current p6think.  It's not so far off of the Python
model here, I suspect, at least on the Int level.

Larry

Reply via email to