Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I think there's really two things (maybe three) things going on here. First. there's preferring methods and classes over subs. Second, there's a willingness to use CPAN and not reinvent the wheel. And third, there's setting coding standards at work.

For #1, not sure I can really help you. OOP is not suitable for every task, and lots of people think it tends to be overused (or at least used when not really appropriate). There is a performance hit, and extra coding overhead for going OOP, though on the other hand this is often made up by simplifying maintenance. You say to-MAY-to, I say to-MAH-to. Different strokes for different folks and all that.

For #2, that's a bit more serious. Most of the CPAN modules are OO because it provides encapsulation and a defined interface, and that's all a good thing. I can't imagine someone avoiding the "OO style" so strenuously that they would avoid the CPAN. That's just not smart.

Lastly, it's common practice to enforce coding practices at work, and establish policies and such. If your OO code is the standard code that's supposed to be used at your business, then that's what's supposed to be done. Creating multiple competing solutions that perform the same function is not good business, and if you can't enforce uniformity at this you should find someone higher up your food chain that can.

Bottom line is we're not really talking about OO versus non-OO. He's totally within his rights to prefer one style over another, but work is a whole different matter.

Gary Blackburn
Trained Killer


In reply to Re: Coding styles: OOP vs. Subs by Trimbach
in thread Coding styles: OOP vs. Subs by nikos

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, 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, 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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (4)
    As of 2020-07-04 11:11 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?