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 pointer for "copying the pointer" to be meaningful. Thus, since I and N registers are not pointers, they can't support the semantics implied by := . Except that's not the way I think about it. Let me give one more try at explaining my mindset, and then I'll let it rest: 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 reasonable for numbers. OK, one more try: Under your proposal, you must use "=" to change the contents of I and N registers, but must use ":=" to change the contents of P and S registers, since "=" doesn't affect the P register itself, but only its contents. Consequently, I will need to emit ":=" for all P and S destinations, and "=" for all N and I destinations, even though I think of them as "copying the object" in all cases. (I suppose I could switch to using "set" in all cases -- or is that going to change, too?) There's also a language design argument in favor of using "=" for aliasing and ":=" (or something else) for assignment, allocating more characters for the latter, which is doing something deeper. But clearly, I'm beating a dead horse at this point. ;-} Of course, I expect this is a minority viewpoint, and it's better to have a confused minority than a confused majority. So I'll adapt to whatever you decide. -- Bob Rogers