From: Robert Dober Date: 2008-03-31T00:20:57+09:00 Subject: Re: instance variable access On Sun, Mar 30, 2008 at 5:04 PM, Rick DeNatale wrote: > On Sun, Mar 30, 2008 at 10:09 AM, Robert Dober wrote: > > On Sun, Mar 30, 2008 at 1:05 PM, Trans wrote: > > Basically I like the idea. > > I don't. > > This sort of thing encourages thinking about objects as data > structures rather than objects and discourages good OO implementation > practices such as "Tell don't ask". > > Just because instance_variable_get and instance_variable_set are > there, kind of like a fire extinguisher behind a glass door, doesn't > mean that their use should be encouraged, or that magic hammers to > break the glass without thinking about the consequences are a good > idea. I see your point but disagree nevertheless, why should we poor metaprogrammers or DSL implementers not give ourselves the tools, IOW if one wants to abuse of Tom's code one will abuse of the classical ivar accessors instead. But I agree with you in general about the usage of metaprogramming. BTW Tom is doing his best for "Tell don't ask" but at the metalevel. Robert > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/ > > -- http://ruby-smalltalk.blogspot.com/ --- Whereof one cannot speak, thereof one must be silent. Ludwig Wittgenstein