in reply to Re (tilly) 1: Hiding Internal Classes ?
in thread Hiding Internal Classes ?

A class it itself an object: Yes, if blessing (and @ISA) referred to the underlying symbol table hash, rather than it's name, then you could use references to unnamed classes. But the implementation is based on the string, not what it ultimatly resolves to.

Why?

  • Comment on Re: Re (tilly) 1: Hiding Internal Classes ?

Replies are listed 'Best First'.
Re(tilly) 3: Hiding Internal Classes ?
by tilly (Archbishop) on Jul 11, 2001 at 06:28 UTC
    Probably because Perl's OO is a hack on top of package namespaces. Constructed at a time when references were still really new in Perl, and nobody knew how useful they would turn out to be or how far they would go.

    And the idea of a class as an object is not part of Perl. Indeed there are many Perl programmers who think it a ood idea to make what I would say should be class methods into object methods. (Yes, I am referring to the testing in new whether you are passed something blessed...)

      If that's the only reason, then maybe Perl 6 will go farther in using references rather than strings for more things. (Any p6p's listening?)