Archived

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

clabinsky

Pimpl in games?

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