From: Austin Ziegler Date: 2007-10-01T21:56:02+09:00 Subject: Re: a = Dog.new # a is not a pointer and not a reference? On 9/30/07, Gary Wright wrote: > On Sep 30, 2007, at 10:54 PM, Austin Ziegler wrote: > > Conceptually, they're better seen as labels or sticky notes. Maybe not > > for the implementers, but definitely at the normal programmer's level. > > Thinking about them more than that is just asking for madness because > > you can't interact with them at any other level than that. > I can see the value of the sticky note analogy but I think it > obscures the idea of scopes. It puts the variable name in close > proximity to the referred object and not the referring scope. It's an analogy. Nothing more, nothing less. There are ALWAYS limits to analogies. The limit to the sticky note analogy is that scopes are obscured. I don't have a problem with that, because that's not the nature of the confusion that was being exhibited. With some mind-bending, scopes could be dealt with in the analogy (when you enter a new scope, you put a piece of wrapping paper over the object and you can name things...). > The problem with the sticky note analogy, for me, is that it implies > that the object has access to the sticky notes--that the object > can 'see' what variables are referring to itself. That's not at all implied by what I said. If I were to attach a sticky note to the middle of your back, you wouldn't have access to it. ;) But even if we change it to your "note with name and phone number" concept, the important piece here is that the variable is a note, not a container. Again, this doesn't apply to actual implementation details, but when I'm programming in Ruby, I simply don't think about the space a variable consumes. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca