in reply to Re^6: OO automatic accessor generation
in thread OO automatic accessor generation

I (still) believe that there are people out there who want to understand the basics of a programing language before trying to "get something done" with it.

Why stop at blesssing hashes then and not have them write their own method dispatch systems? The blessed-referent, package-is-a-class, method-is-a-sub bare-bones approach of Perl 5 doesn't teach much about OO. It instead teaches a lot about how to smoosh together a few orthogonal concepts into the skeleton of an OO system.

To whom is that valuable?

Replies are listed 'Best First'.
Re^8: OO automatic accessor generation
by WizardOfUz (Friar) on Nov 12, 2009 at 09:27 UTC
    To whom is that valuable?

    To anyone wanting to understand ~99% of the code on CPAN, for example.

      Your argument is "People new to Perl should not use Moose and should create their own object systems because that way they can look in CPAN modules and understand what's happening"? That's silly. If you look in my Mail::TempAddress, your knowledge of blessed hashes won't help much if you don't know anything about SMTP and mail server configuration.

      Assuming that a primary goal of people trying to learn OO Perl really is to understand CPAN modules, what about wanting to understand the 15% of the code on the CPAN that uses Moose?

      (I'm tempted to argue that Moose makes the OO concepts easier to understand by not exposing the Perl 5 mechanism of OO; someone who understands OO can understand Perl 5's mechanism much easier. The other way around is more difficult.)

        Your argument is "People new to Perl should not use Moose and should create their own object systems because that way they can look in CPAN modules and understand what's happening"?

        No, it is not. And I think you know that.

        Assuming that a primary goal of people trying to learn OO Perl really is to understand CPAN modules, what about wanting to understand the 15% of the code on the CPAN that uses Moose?

        Since Moose itself is based upon those pesky blessed hashes you seem to abhor, I don't see your point here.