Hence the qualification, even when it would be a good way to solve the problem at hand.

Your qualification doesn't address the issue at all. You seem to think that structured programming automatically must come prior to OOP in some way. That's not the case even if it is the order you learned those paradigms. As evidence of this, I could point you at any of dozens (more likely hundreds or thousands) of degree programs in computer science that have opted to use C++ or Java as their teaching languages.

A choice to use a procedural approach when an OO approach would do nicely doesn't mark code as either "baby" or "bad" any more than, say, choosing to use an OO approach when a functional approach would be a good way to solve the problem at hand.

And, despite your assertion to the contrary, I know several very competent Perl programmers who have been programming in Perl for a decade or more and never use Perl's OO features (except when forced to by Some::Module's interface.)

Are you seriously arguing that the example I gave of what I was talking about constitutes good code, or are you just trolling?

Firstly, there is nothing particularly bad about the example code you gave. If it was really solving a problem, I'd be perfectly content to see it written that way. Secondly, your example was highly contrived and looked more like an example you'd find in a programming tutorial than "real" code. Sure... programming exercises are "baby"... but, that's by design. I think we were discussing real-life code.

Lastly, are you seriously suggesting in any way whatsoever that I might be trolling? Well, you get a decrement from me for that and I suspect that's the comment that earned you the (currently) one other decrement on this node.

Edit: minor grammatical correction.

-sauoq
"My two cents aren't worth a dime.";

In reply to Re^2: "Baby" Perl versus "Bad" Perl by sauoq
in thread "Baby" Perl versus "Bad" Perl by Ovid

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.