top | item 35593877

(no title)

dromtrund | 2 years ago

+1, this approach will also highlight cases where you're trying to generalize something that isn't as generic as you thought.

I'd argue that the need for downcasting in a method working on the inner context would also be a code smell, and that you might want to reconsider the context split. In some cases, there's no way around it (like async events), but it might be more appropriate to pass additional context or a callback instead, to avoid a circular dependency.

discuss

order

No comments yet.