On Wed, Feb 09, 2005 at 03:15:02PM -0500, Ron Kuper wrote: > >>> > I could see such a model. But I don't see how it is any more > future-proof > than the simpler model: > > * DLL has one entry point - the descriptor lookup function > * You ask the lookup function for each successive descriptor, until no > more are found. > * You invoke a method of a descriptor to instantiate an instance of that > plugin > <<< > > Your proposal is less OO, but not "simpler." Simplicity is in the eye > of the beholder. It's simpler because there is less code, less entities, less explanation. :) > To me, OO done right breeds simplicity. An object gives you a mental > abstraction, and image that evokes a process and a set of interactions. > To me a factory that emits objects given a unique identifier is a simple > model. And to me it's a hack to squeeze another class into the system. One of the biggest problems I have with OO is that it gets over-normalized. You end up with a bazillion factories and message passers and so on and so forth. If something is an entity, make it an entity - a Plugin has data and code and begs to be encapsulated. If something is a process, make it a process - a Factory exists to do something just the same as a function. Contrary to some OO pundits, it's not always bad to have functions that aren't attached to an object. Besides that, why decouple the create() method from the descriptor - that's the opposite of OO! > Why such resistance to an OO design? Did you have a lousy C++ professor > or something? :-) I'm fine with OO when and only when it makes things cleaner. And for the record, I *barely* program C++, but I know OO very well. I see part of my job as reminding you all that the API is still meant to be usable from C :) ---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission. Archive: //www.freelists.org/archives/gmpi Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe