> 3. It's not understandable to many people (probably except > those who already > know it) and will probably cause maintenance problems.
Well... You could say the same about STL. In the case of STL, if a maintenance programmer doesn't understand it, the solution is to make him learn it, because it is standard and useful. I think that the pimpl idiom, since it is written about extensively, is the same. > It has its own merits (like any technique suggested by gurus > like Sutter) > but it's not what you want to do with each and every poor C++ > class. That's true. I use it for interface classes and any class that defines and uses a bunch of private classes. I use it when: 1) It is an interface to other programmer's code, or at least other modules, or 2) I would have to put an #include to one of my .h files in another .h file, and the (slight) performance hit is not important. IOW, in .h files, I only #include system files (for instance "#include <algorithm>") or definitions for base classes (because there is no way around that), unless there are extenuating circumstances. > > ------------- > Ehsan Akhgari > > Farda Technology (http://www.farda-tech.com/) > > List Owner: [email protected] > > [ Email: [EMAIL PROTECTED] ] > [ WWW: http://www.beginthread.com/Ehsan ] > > But the thought is one thing, the deed another, and the idea > of the deed > still another. The wheel of causality does not roll between them. > -Thus Spoke Zarathustra, F. W. Nietzsche > > > > > _______________________________________________ > msvc mailing list > [email protected] > See > http://beginthread.com/mailman/listinfo/msvc_beginthread.com > for subscription changes, and list archive. > _______________________________________________ msvc mailing list [email protected] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
