Re: The last shall be last (was: The first shall be first)

2004-09-05 Thread Smylers
John Williams writes: BTW, there should be no ambiguity between Cpostfix:'th and C'', because one occurs where an operator is expected, and one occurs where a term is expected. There may be no ambiguity for the Perl engine, but any use of C' for anything other than quoting makes life hard for

Re: The last shall be last (was: The first shall be first)

2004-09-05 Thread Richard Proctor
On Sun 05 Sep, David Green wrote: On 2004/9/04, [EMAIL PROTECTED] (Jonathan Lang) wrote: (Nice Subject change, I almost missed it!) Larry Wall wrote: Yow. Presumably nth without an argument would mean the last. If it means the last, why not just use Clast? Conflict with last LOOP?

The last shall be last (was: The first shall be first)

2004-09-04 Thread Jonathan Lang
Larry Wall wrote: David Green wrote: : I actually found things I liked in pretty much all the suggested : alternatives, but none of them reached out and grabbed me by the : throat the way nth did. It just seems more Perlish. Yow. Presumably nth without an argument would mean the last.

Re: The last shall be last (was: The first shall be first)

2004-09-04 Thread David Green
On 2004/9/04, [EMAIL PROTECTED] (Jonathan Lang) wrote: (Nice Subject change, I almost missed it!) Larry Wall wrote: Yow. Presumably nth without an argument would mean the last. If it means the last, why not just use Clast? Conflict with last LOOP? Hm, the context should be enough to

Re: The last shall be last (was: The first shall be first)

2004-09-04 Thread Jonathan Lang
David Green wrote: Anyway, if we can have last, we should also have first (just for people who don't mind all the extra typing). No problem here, especially if C0th and Clast are synonyms - that is, make ..., -4th, -3rd, -2nd, -1st, 0th, 1st, 2nd, 3rd, 4th, ... be the underlying mechanism, and

Re: The last shall be last (was: The first shall be first)

2004-09-04 Thread David Green
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jonathan Lang) wrote: No problem here, especially if C0th and Clast are synonyms - that is, make ..., -4th, -3rd, -2nd, -1st, 0th, 1st, 2nd, 3rd, 4th, ... be the underlying mechanism, and define Clast and Cfirst as synonyms for C0th and C1st.

Re: The last shall be last (was: The first shall be first)

2004-09-04 Thread Jonathan Lang
David Green wrote: Jonathan Lang wrote: If C@foo[last+1]=$bar is equivalent to Cpush @foo, $bar, what happens if you say C@foo[last+2]=$bar? While I like the notion that subtracting from first or adding to last takes you beyond the bounds of the list, you generally can't go more than

Re: The last shall be last (was: The first shall be first)

2004-09-04 Thread John Williams
On Sat, 4 Sep 2004, Jonathan Lang wrote: The only place where it makes sense to wrap is when you define 0th as the final element, making it logical that 0th+1 == 1st and 1st-1 == 0th. I don't think 0th is a good name for the final element. I've never seen it used for that. I've only seen it