Copying methods from one class to another

T. Onoma wrote:

“T” == T Onoma transami@runbox.com writes:

  self.superclass.__send__(:define_method, m, meth)

Sincerely, what do you expect which such a program ?

Essentially, combining two classes to behave as a single unit. The
inner layer
is the core class (superclass) and the outer layer is the wrapper
class
(subclass). The end-user deals with the wrapper, unknowingly that
it is
bumping things up to the hidden superclass b/c includes and method
additions
need to be in core class as usual.

What sort of real problem are you trying to solve here with all
these class/hierarchy shenanigans?

···

On Wednesday 17 December 2003 11:01 am, ts wrote:


Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

I’ll answer with a reference to a new mailing list. There you will find the
continuation of Peters’ and my discussion on Aspect Oriented Programming
(AOP) features for Ruby, in which method wraps are an essential part (read:
the real problem)

ANN: SUBY-MUSE MAILING LIST

suby-muse is a list for general programming langauge exploration, with a
heavily decided bent toward Ruby as a basis. In fact most of the conversation
is centerd around Ruby, it’s future, and its foundations, like Smalltalk. Yet
discussion of any and all programming concpets, languages, techinques, etc.,
are more than welcome.

Suby basically stands for Suggestive Ruby. (Although, I like SuperUberRuby
myself :wink:

Anyone open to new language ideas, and enjoys more detailed analysis of those
possibilities, is welcome to join in:

http://lists.berlios.de/mailman/listinfo/suby-muse

Archives can be found here:

http://lists.berlios.de/pipermail/suby-muse/

Look for thread “Underpinnings of Method Wrapping” for answer to real
problem
w/ “shenanigans” :slight_smile:

Enjoy!

···

On Wednesday 17 December 2003 03:43 pm, Michael Campbell wrote:

What sort of real problem are you trying to solve here with all
these class/hierarchy shenanigans?


T.

ANN: SUBY-MUSE MAILING LIST

Great idea! I would suggest you end this and other related threads on
ruby-talk and move them immediately to your new list. Thanks!

Chad

···

On Thu, 18 Dec 2003, T. Onoma wrote:

Indeed, I have. But I just want to point out, I came to ruby-talk with a
simple question: is it possible to do “xyz” in Ruby? And certainly ruby-talk
is the appropriate review for such a question. I had no intention of starting
a heated discussion on the merits of doing said “xyz”. Other’s started that
slant.

···

On Wednesday 17 December 2003 05:44 pm, Chad Fowler wrote:

On Thu, 18 Dec 2003, T. Onoma wrote:

ANN: SUBY-MUSE MAILING LIST

Great idea! I would suggest you end this and other related threads on
ruby-talk and move them immediately to your new list. Thanks!

Chad


T.

T. Onoma wrote:

···

On Wednesday 17 December 2003 05:44 pm, Chad Fowler wrote:

On Thu, 18 Dec 2003, T. Onoma wrote:

ANN: SUBY-MUSE MAILING LIST

Great idea! I would suggest you end this and other related threads on
ruby-talk and move them immediately to your new list. Thanks!

Chad

Indeed, I have. But I just want to point out, I came to ruby-talk with a
simple question: is it possible to do “xyz” in Ruby? And certainly ruby-talk
is the appropriate review for such a question. I had no intention of starting
a heated discussion on the merits of doing said “xyz”. Other’s started that
slant.

It’s almost impossible sometimes to avoid that slant. What if everyone
thinks “xyz” is stupid, insane, meaningless, and/or futile?

If someone asks me whether he can clip his toenails with a handgun, the
question itself is not so important as the other questions it raises.

Hal

T. Onoma wrote:

… But I just want to point out, I came to ruby-talk with a
simple question: is it possible to do “xyz” in Ruby? And certainly ruby-talk
is the appropriate review for such a question. I had no intention of starting
a heated discussion on the merits of doing said “xyz”. Other’s started that
slant.

I asked very much the same question a couple of weeks ago and got only
friendly answers (see [ruby-talk:75217]).

So it must be simply you or your name that triggers heated discussions,
even with people I thought would stand above such things. I respect
those people for their knowledge and most of their input to ruby-talk,
but I really hate such intolerance.

Let me tell you that I didn’t find anything offensive in your question
and hope you don’t get too frustrated.

Regards,
Pit