There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I agree with the essential sentiment that "you are looking for 'a factory.'" And let me now explain just what I am talking about here... The essential common-sense notion of "a superclass" (tah-daah! ooohhh... ahhhh... wowww....) is that, with such a thing, I am able to exploit commonality. In other words, with such a concept I will be able to apply more-or-less the same effort, once, toward "doing whatever it is I need to do" with ... "English, French, and Italian, all at the same time." ("After all, they are all 'languages,' right?" Indeed. "And so it stands to reason that most of whatever I am doing ought to apply equally to 'all languages?'" Indeed.) This goal of "exploiting commonality" is, "indeed," 'a worthy goal, to be sure.' But if we look at it more closely, we see that it is an entirely separate goal from the very-specific second requirement that you speak of: "figuring out which (human language) is 'most appropriate' for me." Ahh, yes... There's 'the rub.' The question is not, "how easy was this thing for the manufacturer to build," but rather, "how appropriate is this thing to what I want to do?" It is, after all, a separate and distinct problem from the problem that we intend to solve through the mechanism of classes and superclasses. That concept will be quite-useful in building the various classes (through the economy of effort), but not-at-all useful in choosing between them! That concern, namely the concern of choosing, is the concern of "a 'factory,'" not that of "a class." The metaphor is breaking down here quite badly, but the essential idea here is that ... classes and superclasses are intended to economize effort in manufacturing, whereas factories come into play when choosing among the various possibilities that have been 'manufactured.' (It may well help to "forget about Perl for a moment, and think about real life!") :-D In reply to Re: Registering Subclass Modules via Plugin
by sundialsvc4
|
|