From: "Hal E. Fulton" Date: 2003-05-21T12:42:48+09:00 Subject: super, aliases, defadvice, AOP, and so on Hello, all. I'm reopening an issue I brought up once before, just to make sure it isn't forgotten or under-explored. Actually the thing I brought up opened up a wider field of discussion, and that's what interests me. Think for a moment about why we have the keyword "super" -- it's a way of distinguishing between the current method and the one in the parent, but it's also a convenient shorthand that does not depend on the method name. I once proposed a keyword "prior" that would refer to the old definition of a method that was being replaced. This would make unnecessary the idiom of explicitly creating an alias and then calling the old method by name. But Matz replied (I'm paraphrasing) that this was a part of a more general problem, and that something like Lisp's defadvice was the answer. Disclaimer: I don't know Lisp and I know little about AOP. But it seems likely to me that this is where AOP gets its odd usage of the word "advice." But this whole concept interests me. If Ruby had suitable operations built in, it could make AOP much easier, I think; not to mention certain kinds of tools such as debuggers and profilers. I'm sure nothing like this will come about until Rite at the earliest, however. But I don't consider it too early to speculate. So: How does Lisp's defadvice work? How should something similar in Ruby work? Matz, Dave, others? Hal