Is the Bridge Pattern the same as Herb Sutter's Pimpl Idiom?

Discussion in 'C++' started by Debajit Adhikary, Jul 14, 2004.

  1. I'm still pretty new to design patterns... I was wondering, is there
    any difference between the Bridge Pattern and Herb Sutter's Pimpl
    Idiom?

    Both delegate responsibility to an implementation and thus allow a
    clear and flexible separation of interface and implementation such that
    the implementation can be changed freely.
     
    Debajit Adhikary, Jul 14, 2004
    #1
    1. Advertising

  2. Debajit  Adhikary

    Daniel T. Guest

    "Debajit Adhikary" <> wrote:

    >I'm still pretty new to design patterns... I was wondering, is there
    >any difference between the Bridge Pattern and Herb Sutter's Pimpl
    >Idiom?


    Yes. With the Pimpl Idiom the outside class is not an "Abstraction" and
    the inside class can only be of one specific type. With the 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.

    The purpose of Pimpl is to break a compilation dependency, the purpose
    of Bridge is to allow a Class to be extended in two independent ways.
     
    Daniel T., Jul 14, 2004
    #2
    1. Advertising

  3. Debajit Adhikary <> spoke thus:

    > I'm still pretty new to design patterns... I was wondering, is there
    > any difference between the Bridge Pattern and Herb Sutter's Pimpl
    > Idiom?


    Just as an FYI, the people on comp.object can help you with this.

    http://www.slack.net/~shiva/welcome.txt
    http://www.parashift.com/c -faq-lite/

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
     
    Christopher Benson-Manica, Jul 15, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Icosahedron

    Pimpl Idiom

    Icosahedron, Nov 20, 2003, in forum: C++
    Replies:
    7
    Views:
    753
    Icosahedron
    Nov 22, 2003
  2. Mikhail N. Kupchik
    Replies:
    7
    Views:
    460
    Glen Low
    Aug 23, 2004
  3. EDG
    Replies:
    1
    Views:
    890
    Markus Schoder
    Jun 30, 2007
  4. EDG
    Replies:
    2
    Views:
    569
    Richard Heathfield
    Jun 30, 2007
  5. Lynn McGuire
    Replies:
    27
    Views:
    456
    Melzzzzz
    Sep 25, 2013
Loading...

Share This Page