Re: Solving '=' confusion: ':=' for aliasing

2005-11-30 Thread Roger Browne
Salzenberg wrote: ... any language using := for assignment is doomed to obscurity.[*] It's a law of nature. chuckle :-) (Ah, language design. :-)) No choice will satisfy everyone. So we each say our piece, then we happily accept whatever the designer decides. No problem. Regards, Roger

Re: Solving '=' confusion: ':=' for aliasing

2005-11-30 Thread Josh Isom
My view I understand the way it's currently done. I'm totally lost at what's being proposed. Joshua On Wed, 30 Nov 2005, Roger Browne wrote: Salzenberg wrote: ... any language using := for assignment is doomed to obscurity.[*] It's a law of nature. chuckle :-) (Ah, language

Re: Solving '=' confusion: ':=' for aliasing

2005-11-30 Thread Joshua Juran
On Nov 29, 2005, at 5:16 PM, Chip Salzenberg wrote: On Tue, Nov 29, 2005 at 11:13:05PM +0100, Leopold Toetsch wrote: On Nov 29, 2005, at 21:36, Chip Salzenberg wrote: I'm planning a flag day sometime in December. I'm also planning to create a simple handles most cases translator. That's

Re: Solving '=' confusion: ':=' for aliasing

2005-11-30 Thread Chip Salzenberg
On Wed, Nov 30, 2005 at 12:49:13PM -0500, Joshua Juran wrote: On Nov 29, 2005, at 5:16 PM, Chip Salzenberg wrote: Excellent. Now if only I knew a good language for text filters... How about sed or awk? Hm. If only we had a pir2xml, I could use XSLT. -- Chip Salzenberg [EMAIL PROTECTED]

Re: Solving '=' confusion: ':=' for aliasing

2005-11-30 Thread Larry Wall
On Wed, Nov 30, 2005 at 11:04:43AM -0800, Chip Salzenberg wrote: : On Wed, Nov 30, 2005 at 12:49:13PM -0500, Joshua Juran wrote: : On Nov 29, 2005, at 5:16 PM, Chip Salzenberg wrote: : Excellent. Now if only I knew a good language for text filters... : : How about sed or awk? : : Hm. If

Re: Solving '=' confusion: ':=' for aliasing

2005-11-30 Thread Chip Salzenberg
On Wed, Nov 30, 2005 at 12:41:59PM -0800, Larry Wall wrote: op_leave seq=0 - DONE targ=1 flags=VOID,KIDS,PARENS private=REFCOUNTED refcnt=1 op_enter seq=1 - 2 / op_null seq=0 - (2) flags=VOID madprops mad_sv key=p val=/ mad_sv key=_

Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
Consider: P0 = P1 P0 = S1 P0 = I1 P0 = N1 o/~ One of these things is not like the others One of these things just doesn't belong o/~ And if I have to read: P0 = new .Integer P0 = 1 one more time... *sigh* Therefore, I propose requiring people to spell aliasing as

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Brent 'Dax' Royal-Gordon
Chip Salzenberg [EMAIL PROTECTED] wrote: P0 := P1 # aliasing: P0 and P1 point to same PMC P0 := opcode # aliasing: P0 points to PMC returned by opcode P0 = ... # assignment: modifies P0, NO MATTER WHAT '...' IS S0 := S1 # aliasing: S0 and S1 point to same

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Patrick R. Michaud
On Tue, Nov 29, 2005 at 12:08:01PM -0800, Chip Salzenberg wrote: Therefore, I propose requiring people to spell aliasing as ':='. This will affect all code generated to use P and S registers. It should be an easy fix (albeit an extensive one). And if we don't do it now, it'll just get

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Matt Diephouse
Chip Salzenberg [EMAIL PROTECTED] wrote: And if I have to read: P0 = new .Integer P0 = 1 one more time... *sigh* Therefore, I propose requiring people to spell aliasing as ':='. This will affect all code generated to use P and S registers. It should be an easy fix (albeit an

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 12:14:24PM -0800, Brent 'Dax' Royal-Gordon wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: P0 := P1 # aliasing: P0 and P1 point to same PMC P0 := opcode # aliasing: P0 points to PMC returned by opcode P0 = ... # assignment: modifies P0, NO

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Patrick R. Michaud
On Tue, Nov 29, 2005 at 02:18:17PM -0600, Patrick R. Michaud wrote: Personally I haven't had much trouble with '=' and I don't think I ever use ':='. Perhaps I've just trained myself to the current implementation, but I like that the shorter '=' does what I tend to want/expect and I write an

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 02:18:17PM -0600, Patrick R. Michaud wrote: On Tue, Nov 29, 2005 at 12:08:01PM -0800, Chip Salzenberg wrote: P0 := P1 # aliasing: P0 and P1 point to same PMC P0 := opcode # aliasing: P0 points to PMC returned by opcode P0 = ... # assignment:

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Brent 'Dax' Royal-Gordon
Chip Salzenberg [EMAIL PROTECTED] wrote: On Tue, Nov 29, 2005 at 12:14:24PM -0800, Brent 'Dax' Royal-Gordon wrote: I'm not sure about the last two (in a lot of ways, they're more like := than = ), I don't see that. Well, for one thing, my way would mean that `set` is always `:=`.

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 03:25:13PM -0500, Matt Diephouse wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: Therefore, I propose requiring people to spell aliasing as ':='. And the Lord did grin. And the people did feast upon the lambs and sloths, and carp and anchovies, and orangutans and

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 12:36:03PM -0800, Chip Salzenberg wrote: On Tue, Nov 29, 2005 at 02:18:17PM -0600, Patrick R. Michaud wrote: P0 = P1[S1]# supported? Yes, it means to fetch a PMC and make P0 an alias to it. Perl 6 equivalent should be, more or less: $a := $array[$i];

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Patrick R. Michaud
On Tue, Nov 29, 2005 at 12:36:03PM -0800, Chip Salzenberg wrote: On Tue, Nov 29, 2005 at 02:18:17PM -0600, Patrick R. Michaud wrote: Second comment: how about access to keyed items -- does this mean: P0 := P1[S1] # alias S0 = P1[S1]# assignment I0 = P1[S1]#

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Bob Rogers
From: Chip Salzenberg [EMAIL PROTECTED] Date: Tue, 29 Nov 2005 12:27:03 -0800 On Tue, Nov 29, 2005 at 12:14:24PM -0800, Brent 'Dax' Royal-Gordon wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: P0 := P1 # aliasing: P0 and P1 point to same PMC P0 := opcode #

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 12:38:55PM -0800, Brent 'Dax' Royal-Gordon wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: On Tue, Nov 29, 2005 at 12:14:24PM -0800, Brent 'Dax' Royal-Gordon wrote: I'm not sure about the last two (in a lot of ways, they're more like := than = ), I don't see

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 03:55:22PM -0500, Bob Rogers wrote: So aliasing copies the pointer (i.e. the object itself), and assignment copies the value? Right. Note, however, that you have to *have* a pointer for copying the pointer to be meaningful. Thus, since I and N registers are not

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Matt Diephouse
Chip Salzenberg [EMAIL PROTECTED] wrote: On Tue, Nov 29, 2005 at 03:25:13PM -0500, Matt Diephouse wrote: Or, perhaps more accurately, `P1 := ...\n assign P0, P1`? No, PIR doesn't do that kind of thing (allocating P registers) behind your back. If a sequence needs a second P register, PIR

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 04:27:28PM -0500, Matt Diephouse wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: On Tue, Nov 29, 2005 at 03:25:13PM -0500, Matt Diephouse wrote: Or, perhaps more accurately, `P1 := ...\n assign P0, P1`? No, PIR doesn't do that kind of thing (allocating P

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 11:13:05PM +0100, Leopold Toetsch wrote: On Nov 29, 2005, at 21:36, Chip Salzenberg wrote: I'm planning a flag day sometime in December. I'm also planning to create a simple handles most cases translator. That's all ok with me, but not without an automatic translator

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Matt Fowles
Chip~ On 11/29/05, Chip Salzenberg [EMAIL PROTECTED] wrote: Consider: P0 = P1 P0 = S1 P0 = I1 P0 = N1 o/~ One of these things is not like the others One of these things just doesn't belong o/~ And if I have to read: P0 = new .Integer P0 = 1 one more

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Roger Browne
On Tue, 2005-11-29 at 12:08 -0800, Chip Salzenberg wrote: Therefore, I propose requiring people to spell aliasing as ':='. Is some different symbol possible, to avoid confusing people who use Algol-like languages where := means assignment (Amber, Ada, Eiffel, Delphi...)? How about: = for

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Bob Rogers
From: Chip Salzenberg [EMAIL PROTECTED] Date: Tue, 29 Nov 2005 13:07:22 -0800 On Tue, Nov 29, 2005 at 03:55:22PM -0500, Bob Rogers wrote: So aliasing copies the pointer (i.e. the object itself), and assignment copies the value? Right. Note, however, that you have to *have* a

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 10:45:12PM +, Roger Browne wrote: On Tue, 2005-11-29 at 12:08 -0800, Chip Salzenberg wrote: Therefore, I propose requiring people to spell aliasing as ':='. Is some different symbol possible, to avoid confusing people who use Algol-like languages where := means

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Chip Salzenberg
On Tue, Nov 29, 2005 at 05:51:42PM -0500, Bob Rogers wrote: I think of PMCs as being objects, not containers for something else, and := as meaning copy the object (which is synonymous with copy the reference to the object) and = as copy the contents. Under this interpretation, both are

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Allison Randal
On Nov 29, 2005, at 15:08, Chip Salzenberg wrote: Comments? Fresh or rotten vegetables? My objections: Consider: P0 = P1 P0 = S1 P0 = I1 P0 = N1 o/~ One of these things is not like the others One of these things just doesn't belong o/~ And if I have to read: P0 =