On Mon, 06 Dec 2004 12:22:22 GMT, Smylers [EMAIL PROTECTED] wrote:
David Green writes:
I guess we could always use prepend/append, pull/pop.
No! Cpush and Cpop are a well-defined pair, not just in Perl, for
dealing with stacks; we should keep those as they are. (And no
synonyms, before somebody
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Luke Palmer) wrote:
But what we'd really like to do is: given the user knows what push/pop
do, what would they *guess* to mean shift (I tend to think that this
is a very good technique for naming).
And, well, I'm thinking pull. So it's a
David Green writes:
I guess we could always use prepend/append, pull/pop.
No! Cpush and Cpop are a well-defined pair, not just in Perl, for
dealing with stacks; we should keep those as they are. (And no
synonyms, before somebody suggests any!)
Smylers
Smylers wrote:
Larry Wall writes:
But then are we willing to rename shift/unshift to pull/put?
Yes. Cunshift is a terrible name; when teaching Perl I feel
embarrassed on introducing it.
No!
But I'd be willing to rename them to get/put.
'Pull' is the opposite of 'push', but 'pop
On Mon, Dec 06, 2004 at 10:45:22AM -0500, Austin Hastings wrote:
: But I'd be willing to rename them to get/put.
If I went with get, the opposite would be unget for both historical
and huffmaniacal reasons.
Larry
If I went with get, the opposite would be unget for both historical
and huffmaniacal reasons.
But get has too strong a class accessor connotation in most OO.
unpull? ;-)
Dan Brian wrote:
If I went with get, the opposite would be unget for both historical
and huffmaniacal reasons.
But get has too strong a class accessor connotation in most OO.
unpull? ;-)
pushf/popf. f is for front.
But I still don't see anything wrong with shift/unshift.
I'd prefer to avoid
On Mon, Dec 06, 2004 at 01:25:29PM -0600, Rod Adams wrote:
Dan Brian wrote:
If I went with get, the opposite would be unget for both historical
and huffmaniacal reasons.
But get has too strong a class accessor connotation in most OO.
unpull? ;-)
pushf/popf. f is for front.
Ew!
On Mon, Dec 06, 2004 at 11:52:22AM -0700, Dan Brian wrote:
: If I went with get, the opposite would be unget for both historical
: and huffmaniacal reasons.
:
: But get has too strong a class accessor connotation in most OO.
:
: unpull? ;-)
Given the existence of a unary = for abbreviated use,
Larry Wall wrote:
On Mon, Dec 06, 2004 at 11:52:22AM -0700, Dan Brian wrote:
: If I went with get, the opposite would be unget for both historical
: and huffmaniacal reasons.
Why? (I get the huffman, not the history.) Is it just a nod to unshift?
Given the existence of a unary = for abbreviated
On Mon, Dec 06, 2004 at 03:50:42PM -0500, Austin Hastings wrote:
: Larry Wall wrote:
:
: On Mon, Dec 06, 2004 at 11:52:22AM -0700, Dan Brian wrote:
: : If I went with get, the opposite would be unget for both historical
: : and huffmaniacal reasons.
:
:
: Why? (I get the huffman, not the
stuff grab :-)
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
On Mon, Dec 06, 2004 at 10:45:22AM -0500, Austin Hastings wrote:
: But I'd be willing to rename them to get/put.
If I went with get, the opposite would
On Mon, 6 Dec 2004 11:34:24 -0800, Larry Wall [EMAIL PROTECTED] wrote:
Though it's awfully tempting to fill in the holes in the periodic table:
($a, $b, $c) = @foo * 3;
And then just say all the corresponding unaries default to 1 (or the arity
of the left):
$bit = + $number;
Dan Brian writes:
If there's a willingness to rename shift/unshift, why not consider
going a bit further (and offend shell heritage) to note that pull/put
aren't really linguistically opposed either (unlike push/pull). Why not
rename pop to pull, and use something like put/take for shift
RA == Rod Adams [EMAIL PROTECTED] writes:
RA Brent 'Dax' Royal-Gordon wrote:
Smylers [EMAIL PROTECTED] wrote:
Yes. Cunshift is a terrible name; when teaching Perl I feel
embarrassed on introducing it.
Cunshift's only virtue, IMHO, is that it's clearly the inverse of
If there's a willingness to rename shift/unshift, why not consider
going a bit further (and offend shell heritage) to note that pull/put
aren't really linguistically opposed either (unlike push/pull). Why
not
rename pop to pull, and use something like put/take for shift/unshift?
That goes way
Dan Brian writes:
Having push and pull operate on opposite ends of an array strikes me
as more confusing than even shift.
It makes good sense to me -- if we're trying to move a piano from you to
me then either you can push or your end or I can pull on my end: we're
operating on different ends
It makes good sense to me -- if we're trying to move a piano from you
to
me then either you can push or your end or I can pull on my end: we're
operating on different ends of it, but the effect in both cases is
moving in one direction.
As a mnemonic for remembering which side push/pull operate
Larry Wall writes:
But then are we willing to rename shift/unshift to pull/put?
Yes. Cunshift is a terrible name; when teaching Perl I feel
embarrassed on introducing it.
Given the nature of many of the other changes in Perl 6, completely
changing regexps for example, renaming a couple
Smylers [EMAIL PROTECTED] wrote:
Yes. Cunshift is a terrible name; when teaching Perl I feel
embarrassed on introducing it.
Cunshift's only virtue, IMHO, is that it's clearly the inverse of
Cshift. But I think the spelling and aural relationship between
Cpush, Cpop, Cpull, and Cput is clear
Brent 'Dax' Royal-Gordon wrote:
Smylers [EMAIL PROTECTED] wrote:
Yes. Cunshift is a terrible name; when teaching Perl I feel
embarrassed on introducing it.
Cunshift's only virtue, IMHO, is that it's clearly the inverse of
Cshift. But I think the spelling and aural relationship between
shell heritage) to note that pull/put
aren't really linguistically opposed either (unlike push/pull). Why not
rename pop to pull, and use something like put/take for shift/unshift?
Having push and pull operate on opposite ends of an array strikes me as
more confusing than even shift. When it comes
On Sat, 4 Dec 2004 23:33:24 -0700, Dan Brian [EMAIL PROTECTED] wrote:
If there's a willingness to rename shift/unshift, why not consider
going a bit further (and offend shell heritage) to note that pull/put
aren't really linguistically opposed either (unlike push/pull). Why not
rename pop
23 matches
Mail list logo