At 14:07 06/12/2000 -0500, kyle dawkins wrote:
>Ok, you're missing my point but that's partially my fault for not explaining. 
> First, let me agree:  Java's "everything is an object" mentality sucks 
>balls.  And yes, Perl's duality of functional/OO is really nice.  Taking that 
>away is not what I am advocating... I think there should be the *option* in 
>Perl to disable certain features that make Perl a dangerous language for OO 
>development.  First and foremost, the lack of true encapsulation is 
>disastrous.  There is no concept of private data because instance data is 
>stored in a blessed hash (typically) that's open wide to the world.  It makes 
>it tough to create a true interface/implementation dichotomy that is 
>important in the OO world.

That's because of the way most people implement their classes. Perl does
have a concept of private date (although it's not built into the language
as that) and it's actually fairly easy to get that. OO Programming with
Perl by Damian Conway has plenty of example demonstrating that. I also have
an inheritable Class::ArrayBased somewhere on my disk that provides a
framework for array based objects. Admittedly it's encapsulation through
obscurity (so to say) but people that understand how it works will probably
respect the encapsulation, while those that don't will fail to access the
content as a hashref.

-- robin b.
Make it idiot proof and someone will make a better idiot. 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to