John Williams writes:
On Sun, 5 Sep 2004, Matt Diephouse wrote:
Don't say -1st is the first from last. If last is the opposite of
first, I would expect 1st to mean first from first, which would
mean the second. Say first from the end.
It matches up with perl5 C$array[-1] and is a
On Sun, 5 Sep 2004, Matt Diephouse wrote:
Am I the only one that thinks that -1st should return the last element
in an array under the nth scheme? 1st should mean the first element.
-1st should mean the first element of the reversed array.
Don't say -1st is the first from last. If last is the
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
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?
On Sat, 4 Sep 2004 22:17:22 -0700 (PDT), Jonathan Lang
Agreed; that's why I'd include last for newbies to use. 0th as last
works only as an extension of -1st as first from last, -2nd as
second from last, and so on; you have positive numbers counting from the
first, and negative numbers
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.
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
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
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.
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
10 matches
Mail list logo