At 02:02 PM 3/2/2001 -0600, Jarkko Hietaniemi wrote:
>On Fri, Mar 02, 2001 at 12:05:59PM -0800, Hong Zhang wrote:
> > > >at some
> > > >points it becomes necessary to have an unsigned type for "the largest
> > > >integer" which in this case would be 72 bits.
> > > >[and on a machine with nothing larger than 32 will be 32]
> > >
> > > Sure. The size of an INT will probably be either 32 or 64 bits, depending
> > > both on the size of an IV and the size of a pointer for the target
> > machine.
> >
> > I am still confused by the purpose of INT. Making it a union will lose type
> > safety.
> > Why not just use SV directly?
> >
> > By the way, on OS/400, the pointer is 128 bit and may not be cast between
> > int
> > and void*.
>
>I'm also confused, I thought in Perl 6 internals one idea was to never
>step into the mess of trying to mix integers and pointers.  Crays have
>similar casting issues.

I was hoping to get us something that was guaranteed to hold an integer, no 
matter what it was, so you could do something like:

   struct thingie {
      UV type;
      INT my_int;
   }

the alternative is to do:

   struct thingie {
     UV type;
     IV little_int;
     BIGINT big_int;
   }

which seems wasteful of space.

I think I've been convinced it's just not worth it--since PMCs won't be 
using it, the number of places where it will be used is small enough that 
there's no point.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to