develooper Front page | perl.perl6.language.data | Postings from August 2000

Re: New variable type: matrix

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
August 30, 2000 11:01
Subject:
Re: New variable type: matrix
Message ID:
4.3.2.7.0.20000830135746.00d7b100@24.8.96.48
At 01:47 PM 8/30/00 -0400, Karl Glazebrook wrote:
> > If you do a plain
> >
> >   my int @foo;
> >
> > it'll end up with a contiguous block of memory anyway. :compact seems to
> > me more an attribute for sparse arrays than anything else.
> >
>
>Uhm do you mean a contiguous block of 4 byte integers or a countiguous
>block of perl scalar structures? It is the former we are after.

The former, at least until you do something that requires the array to hold 
things other than ints. Perl is supposed to, at that point, automagically 
upgrade the array to full scalars, or at least something that can handle 
the type being assigned to it. (Or so is my understanding of what Larry 
wants for 'shortcut types' like int, float, or str)

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About