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 [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk