faif/python-patterns

Missing Implementor and Abstraction in Bridge Pattern

sheiun opened this issue · 2 comments

hi @sheiun , thanks for the issue.

  1. In terms of the pattern: Abstraction/interface delegates the work to the implementation/platform.
    It is not about interfaces or abstract classes in any particular programming language.

  2. As I see it - it is not always necessary to create python ABC classes to emulate something like interface from other languages.

TLDR: don't see a problem here.

Thoughts?

faif commented

One of the benefits of duck typing is that it doesn't force you to define interfaces for everything. You can still do it if you want with a module like abc as mentioned by @gyermolenko, but it's not mandatory. I also find the current implementation fine.