in reply to Re^2: OO in Perl 5: still inadequate
in thread OO in Perl 5: still inadequate

By metric, you have to explain how you measure adequacy. You haven't done that. If you meanto imply that adequacy is completely measured by encapsulation then the argument is quite silly.

I'm not arguing with you about encapsulation. I think you missed the point about OO programming by arguing that you can't do it adequately in Perl.

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review

Replies are listed 'Best First'.
Re^4: OO in Perl 5: still inadequate
by Aristotle (Chancellor) on Jan 21, 2006 at 17:16 UTC

    The metric is: is there a way which keeps my subclass a) isolated and encapsulated from any implementation details of the superclass b) while later letting me break this subclasses’ encapsulation iff I so choose? I explained how the approaches known so far fail to satisfy this metric. (Except I missed the fact that xdg pointed out.)

    Ruby offers that, which is why I said Perl 5 is not on par with it. (Turns out it is.)

    Makeshifts last the longest.

      That's the single measurement that makes Perl 5 OO inadequate? Nothing else matters? That's the only thing you are going to use when you compare other languages?

      Perhaps you should have chosen a better title for your node: "Perl OO encapsulation inadequate", because that's all you're talking about and its a very poor judge of a language's adequacy. Your claims that Perl is deficient come without anything Perl doesn't allow us to do or a way in which it fails to help us get work done.

      I think, then, that I'd have to put your argument in the category of "mathematical purity wanking" because you haven't shown any inadequacy in any other dimensions I explained in my original reply. In everyday life, this issue is something far down on the list of things people care about.

      As I said earlier, there are better things to argue about if you want to call Perl's OO inadequate. A better start is Perl's lack of objects. :)

      --
      brian d foy <brian@stonehenge.com>
      Subscribe to The Perl Review

        Sigh. First off, I noted it as an off-the-cuff note. I didn’t think this through deeply or spend much time to present a particularly coherent argument. But it’s something that chafes me about doing OO in Perl (yes, always).

        Would you argue that Perl without strict and lexicals would be… okay, let’s call it “not as adequate as Perl is now“? And would you dispute that a Perl without package globals would be “less adequate”?

        That’s all I want: strict for Perl 5 OOP.

        Sure, I get things done using the status quo. Inadequate doesn’t mean useless: after all, people wrote a lot of useful code in Perl 4 too, yet Perl 5 is undeniably a better language.

        Mathematical purity wanking? Shrug. If that’s what you want to call it, be my guest; I shall be a wanker.

        Makeshifts last the longest.