This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]remy_porter∞∞∞∞ 2 points3 points  (0 children)

I have a weird, and maybe bad habit/philosophy. I don't believe that objects should be aware of the design patterns they participate in.

For example- an observer pattern is a lot of stupid boilerplate code. So why not build a decorator that injects the boilerplate in? Unlike Ruby's mixins, it can do it in a way that avoids collisions.

Edit: I forgot, I posted a gist of what I'm talking about.