Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
cybear...

No matter what you see in the comments, either it's pro-OOP or anit-OOP, you should learn about OOP.
First its not that hard to learn (it's not nuclear science, it's not even math, relational database used to be math whatever that means!).

If there is one thing I learned about programming from PerlMonks website; it's there is several pardigms for programming(I dont remember the node name or author, sorry, but there is a specific node that I mean): functional, procedural, OOP, and ... well and more to come I hope! OOP will not corrupt your mind if you learn it.
Mostly people who attack it, are just turned off by other people who are so very ooh-no ooh-my pro-OOP. But OOP is really interesting, as many ppl say, and will continue to say.

OOP can be thought of in many ways, you can think of it as an upgrade to procedural programming, or the next logical step in the comp.lang evolution. In a procedural lang you manipulates data.

Just data you cannot manipulate anything that can not be seen as data!

Data are of course: Numbers(int, floats) and characters (strings!),data here is basically what ever you can insert from your keys in your keyboard...did i miss anything thing.

And functions are functions, anything you cannot describe as data, you had to code a functions to represent it, and still those function can only manipulates data!

OOP offers you a real way (by real I mean OOP is not just a theory, you have real implementation of its concepts) to manipulate more then just data, you can manipulate objects (and that is part why I think OOP implementations that don't support operator overload are missing a great deal!). Of course data can be objects, and objects can be anything. The gotcha here is, objects can only be anything that can be described in functions/methods and data; but hey, look around (at the different programs that exist today), that really almost anything!

So why not think of a button as a function that draw a button!
Don't you think it's better (a better and easier way to think when designing a program) to put a button object, on your window object (function..eek!), and add textArea objects and label objects to make a form!
Yes GUI programming is one area of design that benefits a lot from OOP.

So the bottom line is OOP is way of thinking when designing a program that is actually supported by langs that implement the concept and allow you to code what think the way you think it.

And yes if all you wanted to manipulate is just numbers and characters, OOP would not give you much of and edge.
But still its great to be here when you need it!

And believe it or not OOP offer you a lot more then what I said, take Inheritence, this feature proved to be a great way to organize and upgrade object. And offered a great maner of code reuse. Abstract object at the top more detailled ones as subs, and subs for subs...

A change in the the father Object with affect all its sons! WOW..thats impressive, not impressive to do, but to think about this way, and you know what you really code it that way, you can probably still do the same with regular modules. But isn't a lot more logical and fun to think about it in term of objects!

It really reduce the gap between modelling a program/system and the actual code.

I guess this is all.

In reply to Re: Re: Object Orientation is: by systems
in thread Object Orientation is: by Petruchio

Title:
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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (13)
    As of 2014-09-30 13:17 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (369 votes), past polls