From: Robert Klemme Date: 2004-10-04T23:49:52+09:00 Subject: Re: ruby-dev summary 24298-24353 "trans. (T. Onoma)" schrieb im Newsbeitrag news:200410041018.50833.transami@runbox.com... > On Sunday 03 October 2004 06:49 am, Robert Klemme wrote: > > "trans. (T. Onoma)" schrieb im Newsbeitrag > > > Hmm, maybe should cache the functor for efficiency. > > > > Might not be a good idea since the method can change. Currently I don't > > know a way to detect that change as those method methods always return new > > instances. > > Right. Makes me wish Ruby had an light-weight object class. What exactly do you want this for? What should it do? > > Apart from that I still think that explicit super class method invocation > > other than a method invocing its own super implementation is a code smell > > that indicates the need for a refactoring. > > Hmm... I might say the same thing about instance_variable_set. In fact, one > might go further and say the same about class_eval, instance_eval, > define_method, etc. --in certain way all these "meta features" reek of code > smell! But it's all about the use case. There are core-language related use > cases for which these are must haves. I dare so, though, it might be better > if these features added via #require, rather then always be present. I'd certainly put these into two different categories (different smells, if you like). There are things that you just can't do without eval, class_eval, instance_eval etc. But you usually can set instance variables through normal setters (and you shouldn't if they are not present) and you can do refactoring to access special functionality in a method. So these are really two cups of tea. Regards robert