> My next direction is OOP, but I have found it to be a
> little beyond my grasp each time I try.  Maybe with this
> list's help I can get it.

First you have to unlearn.

Imagine you knew nothing about programming.

Now, I introduce a thing called a variable:

    my Dog $spot;

(ok, the current syntax is different, but let's ignore that.)

Accept the natural English reading of this.

One would not be too surprised to see that followed by:

    $spot->bark;

or

    $spot->hair(long);

One would also not be too surprised to hear that you
don't have to write the recipe for bark and hair -- that
this is something known by all Dogs.

And that:

    my Dog $rex;

has a hair length independent of $spot's.

Imo, that's pretty much all there is to it. Everything
else is just icing on the OOP cake (more functionality)
plus the concrete syntax (a little daunting at first).

(Please, no wars about definitions of OOP. For example,
it's been clear for more than 10 years that inheritance is
most definitely not an essential ingredient of strong OOP.)

Reply via email to