On Fri, Sep 03, 2004 at 09:29:36AM -0700, Larry Wall wrote: > : If so, and > : based on the parameterization above, I assume that there will also be > : the appropriate pointer arithmetic such that if $fido is declared as a > : ref[Dog] and pointed at an array of Dogs, then $fido++ will move to the > : next Dog in the array. Something like this: > : > : my Dog @pound; > : my ref[Dog] $fido; > : # after we've populated the @pound with Dogs ... > : loop ($fido = @pound[0]; ?$fido; $fido++) { > : $fido.bark(); > : } > > I don't see any more reason to allow that in Perl 6 than in Perl 5.
heh, that answers that then. I was trying to put on a "I'm a C coder and I want to write perl as C" hat, but I guess the answer is "learn perl!" > : Is there some other syntax to get a compact array of things? Do I > : need an attribute on the array? > > I don't know what you mean by "of things". If "my int @foo" makes a compact array of ints, is there a way to make a compact array of Dog? (Does it even make sense?) And if so, does it look like "my Dog @foo" or must there be some other syntax to declare it? > I picked it only because that's what the PDL folks came up with > in their series of RFCs after their own round of discussions. > That doesn't mean we can't change it if we do come up with something > better. But I rather like shape. It's short, and not easily confused > with other Perl 6 concepts. Works for me. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]