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 MATTER WHAT '...' IS
> >
> >    S0 := S1      # aliasing:   S0 and S1 point to same header
> >    S0 := opcode  # aliasing:   S0 points to header returned by opcode
> >    S0 = ...      # assignment: modifies S0, NO MATTER WHAT '...' IS
> >
> >    I0 := ...     # ILLEGAL
> >    I0 = ...      # assignment: modifies I0
> >
> >    N0 := ...     # ILLEGAL
> >    N0 = ...      # assignment: modifies N0
> 
> I'm not sure about the last two (in a lot of ways, they're more like
> := than = ),

I don't see that.  The key semantic behind := is alias creation.  After

   I0 = I1   # both old and new syntax

is I0 an alias for I1?  No.  Does modifying I0 modify I1?  No.
Therefore, that's an '=', not a ':='.

Meanwhile, after

   P0 = P1   # OLD SYNTAX

changes to P0 are visible through P1.  Thereofore, in the new scheme,
that's a ':='.

> I suppose that copying looks like:
>     S0 := copy S1

Yes, modulo the choice of the word "copy".  I might call it "clone",
which emphasizes that the return value has its own identity.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to