On Thu, Nov 30, 2000 at 11:23:11AM -0500, Dan Sugalski wrote:
> At 10:20 AM 11/30/00 -0600, Jarkko Hietaniemi wrote:
> >On Thu, Nov 30, 2000 at 10:03:06AM -0600, Jarkko Hietaniemi wrote:
> > > On a related note: a wrapper not completely unlike
> > >
> > > union sv_any_aligned_s {
> > >       IV iv;
> > >       NV iv;
> > >       PV pv;
> > >       void *vp;
> > >       int (*dummy)(void) *fp;
> > >       /* any others? */
> > > };
> > >
> > > should be used around SVs to ascertain that everything fits everywhere.
> >
> >Uhhh.  "around the actual data like the actual IV, NV, PV, etc inside SVs".
> 
> Huh? You're not talking about using this union around, say, the IV slot in 
> a scalar, I hope...

You hope in vain :-) If we still want to in perl6 to do (disgusting)
things like (we do in perl5)

        - "intercast" pointers and integers
        - "intercast" integers and doubles

something like the above is needed (or, at least, is beneficial in
getting it right).  How else can you guarantee that (a) the size
(b) the alignment are right?

All this assuming, of course, that the (basic implementation of)
perl6 SVs is somewhat similar to the perl5 SVs.  If not, never mind
my rambling.

-- 
$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