From: "David A. Black" Date: 2007-10-21T06:59:27+09:00 Subject: Re: Class instance variable idiom Hi -- On Sun, 21 Oct 2007, ara.t.howard wrote: > > On Oct 19, 2007, at 7:27 PM, David A. Black wrote: > >> >> But then they learn about self and instance variables and they stop >> expecting it :-) But I'm not sure I'm following exactly what you mean >> here -- i.e., what your vision is of how it should behave as opposed >> (?) to how it does behave. >> > > it's not a vision - it's production code, gem released for several years: I meant I wasn't sure whether you were saying that you thought the newbie take on instance variables was actually how you felt they should work. > [examples of trait and attribute libraries] > > i think either for of class variable inheritance is preferable to the > @@semantics. it's up in the air whether references or copies should be taken > though. I definitely think they're better than @@this, since (as I understand it) they don't involve blurring the line between and among the objects to which they apply, except via the inheritance line, which I think is more reasonable and useful than the class/instance line. David -- Upcoming training from Ruby Power and Light, LLC: * Intro to Ruby on Rails, Edison, NJ, October 23-26 * Advancing with Rails, Edison, NJ, November 6-9 Both taught by David A. Black. See http://www.rubypal.com for more info!