On Thu, Jul 22, 2004 at 08:43:19AM -0700, Austin Hastings wrote: : --- "Adam D. Lopresto" <[EMAIL PROTECTED]> wrote: : > The modifier to turn off warnings on a line would be ;), winking at : > us to let us know it's up to something. : : I wondered about paren-after-semi, and thought about C<for(;;)>. Which : led me to C<@array[a;b;c]>, then to (a;b;c;), which let me to this: : : Given that @array[1;2;3] is a multi-dimensional reference, is there a : "tuple" data type/element/constructor? : : Can I say, forex, : : my $address = tuple(1;3;5); : : and then : : my $data = @array[$address]; : : and GWIW?
Probably, though maybe not with that exact syntax. : Also, can I C<assume> certain dimensions? : : my @ary is dim(3;3;3) is default('.'); : : my $vct ::= @ary.assuming( .[0;;0] }; : : $vct[0..2] = 0..2; : : @ary.print; # DWIM! : : [ . 0 . ] : [ . 1 . ] : [ . 2 . ] : : Ignoring the DWIM, how much of that works? Well, I've never heard of @array.assuming, but I suspect if the PDLers want something like that, it wouldn't be hard to sneak it in at some point. We're giving them plenty of rope to hang themselves and everyone else too. That being said, you're using .[0;;0] as some kind of a noun when it should mean $_.[0;;0], and that's not gonna be considered very Perl6ish. Besides, you seem to be using 0 to represent one kind of wildcard, and a null slice to represent a different kind of wildcard, and the array itself seems to be varying between three dimensions and two. I doubt that's the syntax you want for mapping one array onto a subset of another. Larry