posts - 37,comments - 7,trackbacks - 0
1. can sometimes add a lot of small classes to a design and this occasionally results in a design that's less than straightforward for others to understand.
2. got typing problems: people sometimes take a piece of client code that relies on specific types and introduce decorators without thinking through everything. Now, one great thing about this pattern is that you can usually insert decorators transparently and the client never has to know it's dealing with a decorator:
3. introducing decorators can increase the complexity of the code needed to instantiate the component.Once you've got decorators, you've got to not only instantiate the component, but also wrap it with who knows how many decorators.
posted on 2005-08-11 09:35 Dave 阅读(94) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: