I am reading the book "Exceptional C++" by Herb Sutter, and in that book I have learned about the pImpl idiom. Basically, the idea is to create a structure for the
So, I am wondering it this technique is really used in practice? Should I use it everywhere, or with caution?
Of course it is used, and in my project, in almost every class, for several reasons you mentioned :
is this technique recommended to be used in embedded systems (where the performance is very important)?
That depends on how powerful your target is. However the only answer to this question is : measure and evaluate what you gain and lose.