Solved

What is the difference between a Bridge pattern and a Pimpl?

Posted on 2004-10-05
3
756 Views
Last Modified: 2008-03-17
I'm reading Design Pattern, and it's description of a Bridge pattern sounds a lot like a Pimpl.

What is the difference between a Bridge pattern and a Pimpl?

Please give example, because that's the best way I can understand it.
0
Comment
Question by:TomoMaili
  • 3
3 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 12231596
The pimpl idiom is useful for reducing physical compile time dependencies. In larger projects, reducing compile times can be very important.
The purpose of Bridge is to allow a Class to be extended in two independent ways.
0
 
LVL 30

Accepted Solution

by:
Axter earned 500 total points
ID: 12231618
With Herb Sutter's Pimpl Idiom the outside class is not an "Abstraction" and
the inside class can only be of one specific type. With (Design Patterns) Bridge
pattern, the outside class is a true abstraction that can be implemented
in any of several different ways, while the inner class is *also* an
abstraction that can be implemented in any of several different ways.
0
 
LVL 30

Expert Comment

by:Axter
ID: 12231909
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question