Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I really didn't find perlboot and perltoot all that useful, back when I was trying to learn thins stuff. So I went to the university library and looked at all the books about OOP. That was astonishingly unproductive. However, in some book (I think it was Adele Goldberg [] (an autodidact herself!) and Kenneth Rubin's Succeeding with Objects [] ) there happened to be a two or three page synopsis of basically what object-orientation means. And that explained it all to me. It's nice to occasionally find a speck of clarity and good writing in comp sci, or any of the technical fields really.

    I later wrote a TPJ article called "User's View of Object-Oriented Modules" [] which you might find helpful to get part of the picture on OOP. It's now available in CPAN as HTML::Tree::AboutObjects []

    The short story on OOP is this: it's about modeling things in terms of data structures whose insides you never touch directly, except with routines called methods. So you have a data structure ("object") that stands for the amortization table for a loan, or a node in a tree, or whatever, and everything you do with that, you do only with the documented routines ("methods"). You can write routines of your own to manipulate the objects, but they in turn use the documented methods.

    Everything else about OOP -- inheritance, accessors, class data, the concept of "polymorphism", and even each particular language's syntax for method calls -- just derives incidentally from the basic concepts.

    Practice, practice, practice, keep things simple, try things different ways, and read Damian's book. []

    • See, I think I understand the basic concept: Data structure(s) and ways to deal with said data structure(s) shrink-wrapped together in kind of an inseparable package. Said package can be duplicated, duplicated with frills, duplicated without certain things, duplicated just for the sake of having another one, etc.

      The trick now is fiddling around and seeing where my mental model of OO is somehow wrong, then playing around with it and some OO code until it's fixed.


      You are what you think.