From: Jamis Buck Date: 2004-11-29T13:43:56+09:00 Subject: Re: What is Ruby for "pimpl"? John Carter wrote: > A useful dependency cutting tool in C++ is the pimpl idiom. > http://www.gotw.ca/gotw/024.htm > > I trying to imagine a ruby translation of the idiom. > > Dependency Injection? Well, there isn't really a "compile" phase for Ruby, so changing any interface of any class never requires a recompile. As long as the change only affects non-published interfaces of the class, the clients of the class will continue unaffected, blissfully ignorant of your refactoring. Dependency injection solves a different set of problems than the pimpl idiom (which is really only necessary for C++). Does that come close to answering your question? Let me know if I've got wide of the mark. - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis