What it is good for

As we already said, the bridge design pattern is similar to the adapter. Here, however, we apply it when we design our applications. One obvious benefit of using it is that we don't end up with an exponential number of classes in our application, which could make the use and maintenance of the pattern pretty complicated. The separation of hierarchies allows us to independently extend them without affecting the other one.

Get Scala Design Patterns - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.