http://www.perlmonks.org?node_id=315671


in reply to Re: Foo is not a Bar, why?
in thread Foo is not a Bar, why?

The fact that inheirtance is done at all through a package variable is where the bolted-on part comes in. Perl just does too much OO stuff at runtime, which ends up being a very good Perl system but not a great OO system.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Re: Foo is not a Bar, why?
by chromatic (Archbishop) on Dec 18, 2003 at 22:36 UTC

    Would you consider Smalltalk a "not great OO system"? It does even more at runtime.

    Also, if Perl 5 introduced both packages and objects, how could objects be "bolted on"? Packages exist, in part, to make objects possible, without requiring OO coding!

Re: Foo is not a Bar, why?
by Abigail-II (Bishop) on Dec 18, 2003 at 22:35 UTC
    You will never hear me saying Perl's OO system is anywhere near half decent. But the problem pointed out by liz isn't an OO specific problem - it can happen with non-OO code as well.

    Abigail