Re: Aliasing an array slice

2003-07-04 Thread dbrook
On Fri, 4 Jul 2003, Damian Conway wrote: > > Will it be possible (or sane even) to bind a variable to an array slice > It *should* be, since it's possible (if ungainly) to do it in Perl 5: Ouch, blatant abuse of perl5's aliasing with @_ and globs ;) Can I also assume that you can also pass around

Re: Perl6 Daydreams (on topic but frivolous)

2003-07-04 Thread Jonadab the Unsightly One
Iain Truskett <[EMAIL PROTECTED]> writes: > * Jonadab the Unsightly One ([EMAIL PROTECTED]) [01 Jul 2003 23:41]: > > Iain Truskett <[EMAIL PROTECTED]> writes: > > > > Not the only one. And with Parrot being able to execute > > > Z-code, it might be sane to port Inform to Parrot! > > > Did you me

Re: Aliasing an array slice

2003-07-04 Thread Damian Conway
Dan Brook wrote: Will it be possible (or sane even) to bind a variable to an array slice It *should* be, since it's possible (if ungainly) to do it in Perl 5: use Data::Dumper 'Dumper'; @bar = (1,2,3); *foo = (sub [EMAIL PROTECTED])->(@bar[1,0,3]); print Dumper [EMAIL PROTECTED];

Re: Aliasing an array slice

2003-07-04 Thread Luke Palmer
> Will it be possible (or sane even) to bind a variable to an array slice > e.g > > ## correct syntax? > my @array = << a list of values >>; > > my @array_slice := @array[ 1 .. @array.end ]; Yeah, that'll work. It has to, lest: my [EMAIL PROTECTED] := (1, 1, map { $^a + $^b } zip(@fi

Aliasing an array slice

2003-07-04 Thread Dan Brook
Will it be possible (or sane even) to bind a variable to an array slice e.g ## correct syntax? my @array = << a list of values >>; my @array_slice := @array[ 1 .. @array.end ]; Or would this merely bind @array_slice to the list returned by the slice, or would it DTRT (in my eyes at least)