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 harder.
>
> So here's the lowdown:
>
> 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
> [...]
> Comments? Fresh or rotten vegetables?
First comment: How do we coordinate the transition? Do we go to
having a separate branch (ick), or do we just declare a date in
which the grand renaming will take place?
Second comment: how about access to keyed items -- does this mean:
P0 := P1[S1] # alias
S0 = P1[S1] # assignment
I0 = P1[S1] # assignment
N0 = P1[S1] # assignment
P0 = P1[S1] # supported?
S0 := P1[S1] # presumably an error?
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 explicit 'assign' or 'set' opcode when
I need something different.
Pm