From: Eleanor McHugh Date: 2009-07-15T16:24:09+09:00 Subject: Re: Twelve rules of Ruby On 14 Jul 2009, at 22:00, Rick DeNatale wrote: > On Tue, Jul 14, 2009 at 3:36 PM, Ryan Davis ruby@zenspider.com> wrote: >> See #1. EVERYTHING is an object, even blocks. > > No, David makes a valid point. There is a difference in Ruby between > a block which is not an object, and a proc/lambda which is. > > Also, variables are not objects either, they refer to objects, and > might be part of the state of an object (or on the invocation stack or > ...) but they are not themselves objects. This is also true in > Smalltalk were we always used the same mantra of "everything is an > object." The mantra is not completely true in Smalltalk either. > > This latter reminds me of the Daltonian model of atoms as indivisible > lumps, vs the current paradigm in Physics. Much of this conversation (specifically regarding "has") reminds me of the arguments over Bohm's Implicate Order. As far as the physics of Ruby methods is concerned, they exist along a search path and can only be said to belong to an object when that search path is successfully queried in response to a message. How that's modelled under the hood is irrelevant, and whether or not a method is associated with an object when a message isn't being applied is a philosophical question which cannot be answered with certainty. Quantum mechanics 101 :) Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason