From: Clifford Heath Date: 2008-02-25T14:49:56+09:00 Subject: Re: Monkeypatching is Destroying Ruby Phlip wrote: > If so, and if it "can't be done in Ruby", why are there Ruby gems that talk > about AOP? Because what's called AOP isn't. There's always a better way than the injection of code which is referred to as AOP, IMO. I could argue this at length, but I hope that not many people here actually care :-). >> A more restricted version of this behaviour can be done by treating every >> aspect-limited extension (which I call a facet) of an object, as a special >> kind of subclass. > That's probably the Ruby AOP packages. Thanks for the pointers! If you want to stay in Ruby, you should use traits instead. It's a little weaker than what I'd call "proper" AOP, but gets as close as you can meaningfully get. Clifford Heath.