develooper Front page | perl.perl6.internals | Postings from February 2002

Re: Parrot is very (intentionally) broken

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
February 8, 2002 08:50
Subject:
Re: Parrot is very (intentionally) broken
Message ID:
a05101404b889b15a3860@[63.120.19.221]
At 4:08 PM +0000 2/8/02, Simon Cozens wrote:
>Larry Wall:
>>  I just think of multidimensionality as another "list of" dimension on
>>  top of the slices.  Alternately, you can think of it as another
>>  dimension on each leaf that turns each scalar into a list.  But the
>>  extra dimension has to sneak in there somewhere if we're to allow
>>  multidimensional slicing.
>
>It will; I'm assuming something like this: Ordinary one-dimensional
>array:
>
>Two-dimensional array:

Can't. Needs to be a linked list. Otherwise we can't nest data structures well.

With a linked list, if the primary PMC is one-dimensional, it can 
just pass on the pointer to the next element in the key list to 
whatever PMC gets pulled up from inside itself. With an array, the 
primary PMC needs to twiddle with the key struct, or generate another 
one.

It's a little less efficient for true multidimensional variables, but 
most of perl lives in chained one-dimensional worlds, for which it 
works pretty well.
-- 
                                         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