in reply to Re3: Encapsulation through stringification - a variation on flyweight objects
in thread Encapsulation through stringification - a variation on flyweight objects
package Foo; sub new {return bless {} => shift} sub oogle {my $shelf = shift; $self -> {key} = shift} package Bar; our @ISA = qw /Foo/; sub gurgle {my $self = shift; $self -> {key} = shift;}
Both Bar and Foo happen to use the same key, because there's no encapsulation.
Perl na(t)ive OO model stinks, because you've to work hard to get encapsulation. (Note: I'm not saying I want private stuff, I just want encapsulation of the implementation). I do not know a common language whose OO model sucks more than Perls.
Abigail
|
---|
Replies are listed 'Best First'. | |
---|---|
Re5: Encapsulation through stringification - a variation on flyweight objects
by dragonchild (Archbishop) on Apr 02, 2003 at 16:02 UTC | |
by Abigail-II (Bishop) on Apr 02, 2003 at 16:34 UTC |