Dan Sugalski [mailto:dan@;sidhe.org] wrote:
> At 8:24 PM -0800 11/6/02, David Whipp wrote:
> >If I am wrong, then I am in need of enlightenment. What
> >is the difference between the primitive types and their
> >heavyweight partners? And which should I use in a typical
> >script?
>
> The big difference is there's no way you can ever truly get a
> primitive type in perl 6. (At least so primitive that you can't hang
> properties off it)
I hope I'm not being stupid here, but isn't that a lack-of difference.
Michael has just confirmed that 'It has been stated multiple times that
primitive types can't take runtime properties or other "object-like"
features', so now I'm confused. Here's a list of things that ints/Ints might
do, and my previous understanding of if they can:
int Int
1 store 32-bit number Y Y
2 store "larger" number N Y
3 store undef N Y
4 have properties N Y
5 be junctions N Y
It appears that you're saying that (4) is incorrect; and if this is wrong,
then (3) is probably wrong too. I wouldn't be surprised if this means that
(5) is wrong also, so this would just leave (2): Ints are bigger than ints.
My original proposal still stands: represent these differences as a
(compile-time) property, not a new type. Failing that, use typenames that
are more distinctive (e.g. BigInt, or int32).
Dave.