From: Trans Date: 2005-10-25T05:47:02+09:00 Subject: Re: Cut-based AOP Christian Neukirchen wrote: > "Trans" writes: > > > itsme213@hotmail.com wrote: > >> Does this also provide a quite general form of dependency injection, > >> very different in nature and weight compared to something like Needle? > > > > Had to give this some thought. Mu immediate conjecture is that it must > > since DI and AOP are closely related. But I'm no DI expert like Jim > > Weirich. But in giving it some conosideration, I imagine there's not > > much more to it than: > > > > class App > > > > def logger > > nil # no logger available > > end > > > > end > > > > cut AppContainer < App > > > > def logger > > Logger.new > > end > > > > end > > Which will make you want "multiple-inheritance" for cutpoints. :-) I thought about this some but I don't understand what you mean. How ill it make you want MI? Aren't mixins enough? > It's not that trivial, but it certainly can be used to implement DI. I realize that it's a trivialized rendition, but could you provided some pointers on improving? Thanks, T.