Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Right job for the tool.

by andal (Hermit)
on May 28, 2014 at 14:12 UTC ( #1087655=note: print w/replies, xml ) Need Help??


in reply to Right job for the tool.

Well, if you can solve your tasks without OO, then probably you don't need it :)

I use blessed variables mostly when I work with set of objects that might be of different class, but provide certain common values/operations. In Java terminology "implement common interface". This allows simpler "divide and conquer" approach to solving problems. But YMMV.

So, OO mostly comes in for complex and large programs. Simple ones are much better without any OO. IMHO :)

Replies are listed 'Best First'.
Re^2: Right job for the tool.
by Laurent_R (Canon) on May 28, 2014 at 22:12 UTC
    I have used OO programming in Perl for real projects only relatively rarely, mainly for building modules, but I agree with the above, if the programs are simple, don't bother. But if you want to build a complex hierarchy of entities and behaviors, then it is a different story, OO programming really becomes handy. So, at the end of the day, it really depends on what you are doing with Perl.

    And, frankly, I find the functional programming paradigm ( la Higher Order Perl) to be most of the time more efficient. But that only my own personal and limited opinion.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2022-12-05 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?