On Thursday, August 14, 2003, at 04:36 , TOGoS wrote:

  P1 = new PerlInt
  P1 <- P2 + P3 # When you see "<-" instead of "=",
                # You know that it's operating on
                # an existing value, not just
                # altering the contents of
                # registers, as your experience
  P0 = P1       # would suggest happens when
  I0 = I1 + I2  # you use the "=" operator.

When I see <-, I think of processor user manuals, and there generally <- means "poke into a register"—exactly the opposite of what you want it to mean. But, in actuality, it'll also be used like memory[GPR1+GPR2] <- GPR3 or GPR3 <- memory[GPR1+GPR2], just less often, since loads and stores are much less common than register-to-register operations in most ISAs. But, in fact, <- means exactly the same thing that = does. Much like set and assign are synonyms.


If there's any need whatsoever to disambiguate the syntax, why make up new syntax? Why not use a syntax which is already familiar to every low-level programmer? How about this for the store (as in load/store) semantics:

*P1 = I1 + I2



Gordon Henriksen
[EMAIL PROTECTED]

Reply via email to