From: Brian Mitchell Date: 2005-09-29T14:19:39+09:00 Subject: Re: Python to Ruby: Two puzzlements... On 9/28/05, Jeff Wood wrote: > yeah ... the point I was trying to make was simply the point about the > implicit reference to self ... any variable you access, any method you call, > anything ... that doesn't have an explicit receiver specified, will use the > implicit reference to self... > > the point of the accessor was simply to create the variable, and methods in > as terse a chop as I could ... but, yes, I do agree that I didn't actually > use all I created, so there wasn't any specific gain from it. > > ... uh ... did that make *ANY* sense ? Just trying to help. =) > > j. > It made enough sense. However, I wouldn't call it all about the receiver. I would call it scope or binding based. Each binding then has a special meaning for self and thus the implicit receiver. There are also other special things to each binding like super. Brian. > On 9/28/05, James Edward Gray II wrote: > > > > On Sep 28, 2005, at 7:15 PM, Jeff Wood wrote: > > > > > oops, that should have been > > > > > > attr_accessor :a > > > > > > ( which is again a method call against self which because it's inside > > > of a class definition *IS* the class object that's being > > > built/modified ) > > > > I'm not sure what you are trying to show here. You build accessor > > methods but you never call them, as you just set the instance > > variable directly. > > > > James Edward Gray II > > > > > > > -- > "http://ruby-lang.org -- do you ruby?" > > Jeff Wood > >