From: Nat Pryce Date: 2002-07-17T21:41:31+09:00 Subject: Re: TkText no -textvariable workaround? From: "Dossy" > I did say "academically" -- in a pure OO language where everything > is an object, the receiver would be the object a, and the method -- or, > the message being sent, would have been "=(x)" ... > > I wonder how Ruby would have been different if Object#=(x) were defined > as an alias to #replace ... I only know of one OO language, Self, where assignments are actually implemented as message sends. In Self, there are only objects and messages. Even stack frames are objects that you send messages to. Slots (local variables and instance variables) are never visible to the programmer. Declaring a slot on an object actually declares two methods on that object, a getter and a setter, that get and set the slot value using some implementation-dependent mechanism. A local variable is implemented as getter/setter methods on the local stack frame. To translate into Ruby terms, the statement "a = x" is conceptually sending the message "a= (x)" to the local stack frame, rather than sending the message "=(x)" to a. Cheers, Nat. ________________________________ Dr. Nathaniel Pryce B13media Ltd. Studio 3a, Aberdeen Business Centre, 22/24 Highbury Grove, London, N5 2EA http://www.b13media.com