Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I don't think it's right to call a language OO if it supports inheritance, abstraction, polymorphism and encapsulation. You should judge how easy it is, and how easy it is to do it right.

You can do all four in C and Pascal, but most people will agree those languages shouldn't be labelled OO. In Perl, it's easy to make something that smells like OO. It's easy to make something that has a variable left of an arrow and a method to the right the arrow. But that doesn't mean you have done it right.

You can do inheritance, abstraction, polymorphism and encapsulation right in Perl. But it's surprisingly hard in Perl to do all four right at the same time. You have to do most of it yourself - the language isn't helping you much. In fact, it tends to work against you. You won't find the right way in the documentation, that just shows you the quick and dirty (wrong) way. It's every (wo)man for him/herself, making it hard to use or understand someone elses code.

If all you care about is writing quick glueing scripts, this OO mockup works handy-dandy. Just as GURU_01 says. But to do it right, Perl is just one small step above C.

I won't call Perl OO for the same reason I won't call Perl a functional programming language. Not because it's impossible to do, but because the language doesn't give you enough tools to make it easy.

Abigail


In reply to Re: Perl - Is it an OO Language by Abigail-II
in thread Perl - Is it an OO Language by krisahoch

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-24 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found