On 10/2/07, Peter C. Verhage <peter / no-nonsense.org> wrote: > Hi, > > In PHP 4 and 5 you have references which work similar like C++ > references. E.g. you can make a variable reference another variable > after which if you change the value of one of those variables the other > variable's value will also be "updated". ... > However, in PHP 5 they introduced a concept similar to the "references" > we know in Ruby. But because they already used the term "reference" they > had to come up with a different name, so they call them object handles. ... > So maybe we should call them handles instead of references to clarify > the difference? I don't know how it relates to PHP 5, but historically object handles meant something different. One way to implement an object memory/heap is to use a level of indirection, an object is represented by what's effectively an element in an array of pointers, with the pointer holding the address of an object's state. Variables refer not to the object directly but to the pointer, which is called a handle. This allows the objects to be moved (during GC for example) without requiring all references to the object to be relocated. Two uses of object handles were in the earliest implementations of Smalltalk, and in the old Macintosh OS. I prefer the term Object Reference myself, and see Object Handle as a particular implementation (at least as the term applies to the systems I just described). -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/