Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
2 answers
555 views

How to solve an issue when a decorator needs variables from the base class?

I have a service class that does some magic. I want to introduce a new type of functionality - raise an event. I am absolutely sure that decorator pattern is great for this scenario. The problem is ...
pro100tom's user avatar
  • 449
7 votes
3 answers
2k views

Looking for a real-world example illustrating that composition can be superior to inheritance [closed]

I watched a bunch of lectures on Clojure and functional programming by Rich Hickey as well as some of the SICP lectures, and I am sold on many concepts of functional programming. I incorporated some ...
Job's user avatar
  • 6,439