Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Coding styles: OOP vs. Subs

by Trimbach (Curate)
on Nov 16, 2005 at 03:03 UTC ( #508880=note: print w/ replies, xml ) Need Help??


in reply to Coding styles: OOP vs. Subs

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


Comment on Re: Coding styles: OOP vs. Subs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://508880]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (14)
As of 2014-08-27 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (248 votes), past polls