2 ms·
I want decorators to be able to manipulate the AST I've thought of a way to do this in Smalltalk. http://news.ycombinator.com/item?id=622773 http://news.ycomb
by stcredzero 18y ago
I want decorators to be able to manipulate the AST
I've thought of a way to do this in Smalltalk.
http://news.ycombinator.com/item?id=622773 http://news.ycombinator.com/item?id=622773
Using #perform: style calls as decorators is ugly, though. Instead of that, one could utilize a MethodWrapper instead.
http://www.refactory.com/Software/MethodWrappers/ http://www.refactory.com/Software/MethodWrappers/
But instead of executing code before & after the method, you'd be executing an alternative version of it instead.