Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Coding styles: OOP vs. Subs

by perrin (Chancellor)
on Nov 16, 2005 at 04:18 UTC ( [id://508897]=note: print w/replies, xml ) Need Help??


in reply to Coding styles: OOP vs. Subs

If I knew how to make co-workers do things my way, I'd probably be the CEO of some large company. This is a people problem.

Since you asked, there are some simple reasons why OO is usually better. You get more code reuse, more encapsulation of components, and thus code that withstands changes more easilly. A really good programmer can do this without traditional OO through careful design and some use of callbacks and such, but this guy does not sound that good.

What he's doing with the huge long files of code should not be tolerated. Splitting code into modules is not an OO thing; it's just a basic good practice.

Unfortunately, the fact that he sees no problem with writing these huge files probably means he isn't very interested in writing good code. Even if you do convince him to use OO, he will probably not know how to do it effectively, and will just write enormous class files.

Finally, claiming performance as a reason not to use OO is absurd. Are you writing some kind of 3D shooter in perl? Has he profiled the code and discovered that method calls are slowing you down? I didn't think so. Your bottleneck is probably I/O (database, disk) like it is for almost every other program written in perl.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found