Advertisement Jump to content


This topic is now archived and is closed to further replies.


Pimpl in games?

This topic is 5839 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After waking up here on beautiful Oahu, seeing the sun coming out from the clouds while zipping coffee out of a newly brewed can...urg..sorry. After reading, thinking, writing, brainstorming on how to get over a problem I have in my game design I came over Herb Sutters description of the Pimpl idiom. I have briefly read this before but I decided to check it out a bit more thoroughly this time, without actually implementing it. There are two things that bother me with Pimpl: efficiency and structure. Personally, I find the code to be a lot less readable with Pimpl and for me that matters right now. After considering its advantages and disadvantages, I can only see one possible use for Pimpl in my code: non critical classes, in terms of speed. What are your thoughts? Do you use it in all/some of your game classes? What makes you decide whether to use it or not?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!