Re: Negative array subscripts

2007-02-14 Thread Jonathan Scott Duff
On 2/6/07, Smylers <[EMAIL PROTECTED] > wrote: Jonathan Scott Duff writes: > ... I can see the need for a pragma to help out the Pascal or Fortran > programmers start all of their arrays at something other than 0. Those sort of crutches in programming languages (let's help folk who know some o

Re: Negative array subscripts

2007-02-13 Thread Smylers
Jonathan Scott Duff writes: > On 2/6/07, Smylers <[EMAIL PROTECTED]> wrote: > > > Blair Sutton writes: > > > > > David Green wrote: > > > > > > > In some ways, I like not having a [0] index at all: programmers > > > > may be used to counting from zero, but normal humans start with > > > > first,

Re: Negative array subscripts

2007-02-08 Thread Blair Sutton
Rafael Garcia-Suarez wrote: Smylers wrote in perl.perl6.language : Hmmm, a pragma's a bit heavyweight for this; how about being able to set this with a special global variable -- that sure sounds handy ... Actually, in perl 5, $[ *is* a pragma... :) A feature I have never felt the

Re: Negative array subscripts

2007-02-08 Thread Blair Sutton
Rafael Garcia-Suarez wrote: Smylers wrote in perl.perl6.language : Hmmm, a pragma's a bit heavyweight for this; how about being able to set this with a special global variable -- that sure sounds handy ... Actually, in perl 5, $[ *is* a pragma... :) A feature I have never felt the

Re: Negative array subscripts

2007-02-07 Thread Rafael Garcia-Suarez
Smylers wrote in perl.perl6.language : > Hmmm, a pragma's a bit heavyweight for this; how about being able to set > this with a special global variable -- that sure sounds handy ... Actually, in perl 5, $[ *is* a pragma... :) -- Grepping the source is good for the soul. -- the perldebguts manpag

Re: Negative array subscripts

2007-02-07 Thread Jonathan Scott Duff
On 2/6/07, Smylers <[EMAIL PROTECTED]> wrote: Blair Sutton writes: > David Green wrote: > > > In some ways, I like not having a [0] index at all: programmers may > > be used to counting from zero, but normal humans start with first, > > second, third, ... third last, second last,... > > My feel

Re: Negative array subscripts

2007-02-06 Thread Smylers
Blair Sutton writes: > David Green wrote: > > > In some ways, I like not having a [0] index at all: programmers may > > be used to counting from zero, but normal humans start with first, > > second, third, ... third last, second last,... > > My feelings are Perl 6 should stick to 0 being the ind

Re: Negative array subscripts

2007-02-06 Thread Blair Sutton
David Green wrote: On 2/5/07, David Green wrote: Then we wouldn't need * to count backwards, although it's still useful to allow us to count past the end of an array. There are all sorts of variations on this scheme, such as whether * is the last element or the one after that, etc., or whether

Re: Negative array subscripts

2007-02-06 Thread TSa
HaloO, David Green wrote: Also, this would solve a problem I've been wondering about with "funny" shapes being lexically scoped. [..] However, what if you pass the funny array along with a (funny) index? E.g. our @flavours (1..32); my $favourite = get_fave(@flavours); #returns index of s

Re: Negative array subscripts

2007-02-05 Thread David Green
On 2/5/07, David Green wrote: Then we wouldn't need * to count backwards, although it's still useful to allow us to count past the end of an array. There are all sorts of variations on this scheme, such as whether * is the last element or the one after that, etc., or whether 0 should be the fi