Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
One reason, which I think you didn't touch upon, is that OO seems to produce much simpler code, at least conceptually. I think that this is because it's much more closely related to procedural programming than the other types of programming, and because (imho, etc) procedual is the simplest type of programming, being closest to it makes for code thats easier to understand.

So OO is often taught as the next step beyond procedural, simply because it's simpler and easier to teach and understand.

Another thought is that OO tends to make code sound simpler, at least conceptually speaking, especially when speaking in more natural languages (such as english and so on). It's much easier to say Object 1 calls Object2's method baz which then takes an object3 which it manipulates in this manner, then to start describing how a functionally oriented program works.

Perhaps what I'm getting at is that objects tend to be the best way to hide implementation details, and this makes everything seem much much simpler when your trying to model something. This may not even be true when you are writing the code, but it's much easier to conceptualize.

One thing I've noticed is that occasionally you have library type code that is programmed as a class/object combination simply because thats the only way the author knows how to appropiately encapsulate his data and methods. This is often the case with Singleton pattern objects, theres no real reason to use an object in this case, you just need a module, but some times the author or the language can't use a module, so you use a Singleton object.

In reply to Re: The world is not object oriented by BUU
in thread The world is not object oriented by tilly

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?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (2)
    As of 2018-02-20 04:19 GMT
    Find Nodes?
      Voting Booth?
      When it is dark outside I am happiest to see ...

      Results (267 votes). Check out past polls.