2013/7/21 Stéphane Ducasse <stephane.duca...@inria.fr>

> > And what I should do if I want Customer which can trigger events?
>
> then ask yourself about the API of your customer
> Do you want the full API of Announcer? I doubt.
>
> > Do you think  "EventSource subclass: #Customer" make any difference? Or
> do you think we should never use inheritance to make domain announcer
> classes? What the existed alternative? I don't want always add announcer
> instance and couple equal methods any time I need it.
>
> Think about API not about code reuse.
> Think about polymorphic objects.
> Each time you subclass from Announcer ALL the API should make sense.
>

What is all api of Announcer? It is just two methods: #announce: and
#on:send:to:. When I need "object with events" I always need this methods.
What problem?

Reply via email to