Beefy Boxes and Bandwidth Generously Provided by pair Networks
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
in thread Registering Subclass Modules via Plugin by 2xlp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2024-03-28 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found