View Poll Results: Do you use the pimpl idiom in your own personal project?

Voters
20. You may not vote on this poll
  • Yes

    10 50.00%
  • No

    4 20.00%
  • Whats pimpl idiom?

    6 30.00%
Results 1 to 6 of 6

Thread: Do you use Pimpl Idiom?

  1. #1
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Cool Do you use Pimpl Idiom?

    I was just curious. How many, and if some or anyone uses the pimpl idiom when writing in your own personal project or not.

    Mods delete this if you think this is a stupid poll
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Do you use Pimpl Idiom?

    Well, if the "personal project" happens to be a library project where it makes sense to use PIMPL due to binary compatibility requirements, then of course.
    J-P Nurmi

  3. #3
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Do you use Pimpl Idiom?

    Well I mean, like for person project where it's not like a library but an application itself.
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  4. #4
    Join Date
    Sep 2006
    Location
    Belgrade
    Posts
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Do you use Pimpl Idiom?

    Yes, even in personal projects. Mostly for things that I plan to make reusable (that is, the things that could eventually end up in a library )
    While you were hanging yourself on someone else's words
    Dying to believe in what you heard
    I was staring straight into the shining sun

  5. #5
    Join Date
    Jul 2006
    Location
    Catalunya - Spain
    Posts
    117
    Thanks
    16
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Do you use Pimpl Idiom?

    Yes, I'm using it all along my code. In libraries ( for binary compatibility ).

    And also in any program I've to made, to avoid "stupid recompilations" ( oops, I've added a private member to "that" base class & ALL the app gets recompilated... )

    I think in general It's a good practice to put the less you can / need in header files and use pimpl.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Do you use Pimpl Idiom?

    I'm often using it in my projects in three cases:
    1. I want good code separation
    2. I'm implementing a library or a class that I think might become part of a library in future
    3. I'm creating implicitly/explcitly shared data classes (where you have to use P-IMPL)

    P-IMPL makes your code harder to read so it should be avoided where maintenance is a priority or where weaker programmers are involved.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. When to use pimpl ?
    By Gopala Krishna in forum General Discussion
    Replies: 17
    Last Post: 16th July 2009, 23:14
  2. Replies: 3
    Last Post: 14th September 2007, 09:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.