Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Comment on

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

Perl6 will be, but if you have little or no prior exposure to OOP I cannot recommend Perl5 for this purpose. (For purposes other than learning OOP, Perl5 is of course wonderful.) Python perhaps, though I personally found Python not to be to my taste.

My favourite book for learning the principles of OOP is the Inform Designer's Manual. The problem domain that Inform is designed to solve (besides being very interesting and providing an excellent didactic framework in general) lends itself spectacularly well to an OO approach, unlike the highly contrived examples in many books, and Graham Nelson is a superbly talented writer.

The only thing is, the book is compiled in the wrong order for this purpose, so you'll want to skip the early parts (about the procedural portions of the Inform language, arithmetic expressions, loops, and so on) and instead go straight to reading the chapters that cover the OO stuff. (The book can be understood just fine in this order, and in fact used to be ordered more this way in the third edition. But you want the fourth edition, because it has many improvements.)

The fourth edition is available both online and in dead tree format.

In reply to Re: Learning OOP by Anonymous Monk
in thread Learning OOP by BarneyFife

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 surveying the Monastery: (4)
    As of 2017-12-16 20:53 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (459 votes). Check out past polls.