Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-07 Thread Alexey Trofimenko
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread David Green
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Smylers
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Austin Hastings
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'

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Larry Wall
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Dan Brian
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? ;-)

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Rod Adams
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Jonathan Scott Duff
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!

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Larry Wall
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,

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Austin Hastings
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Larry Wall
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread mark . a . biggar
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Ashley Winters
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;

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-05 Thread Luke Palmer
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-05 Thread Dan Brian
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-05 Thread Smylers
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-05 Thread Dan Brian
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-04 Thread Smylers
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 of

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-04 Thread Brent 'Dax' Royal-Gordon
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-04 Thread Rod Adams
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

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-04 Thread Dan Brian
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 enough to negate that. But then, I'm a little biased. Except that push and pull are logical opposites linguistically, but not in

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-04 Thread Brent 'Dax' Royal-Gordon
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 to