From: John Carter Date: 2002-01-31T11:38:41+09:00 Subject: Policy Classes - Challenge Alexandrescu's book Modern C++ Design http://cseng.aw.com/book/0,3828,0201704315,00.html describes (See the "Sample Chapter" link) the concept of Policy Classes. I see this, like the laser was, a "Solution looking for a problem". Basically it is the idea that the client of a library should... * Not be forced to inherit from library objects. * Should be able to plug in any suitable class provided by the client or the library as the base class of a library class. * Should be able to plug in several orthoganal policy classes as multiply inherited base classes. He does all this magic by doing arcane things with C++ templates. (Michael Feathers mostly wondrously called the book "Porn for Programmers".) I believe that Ruby mixins whould be able to be able to do all the above in a far far cleaner manner. Indeed item one is the obvious thing about mixins. My only problem is to think of a small, neat and compelling demonstration of these concepts. His examples (with exception of threading policy) all relate to C++ arcana that simply are "not an issue" in Ruby. Question. Can you think of a neat and compelling use for this concept, I'm prepare to write the code as a proof of concept. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand Zeitgeist shutting down for corrective maintenance, please log off.