Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re5: Encapsulation through stringification - a variation on flyweight objects

by dragonchild (Archbishop)
on Apr 02, 2003 at 16:02 UTC ( #247515=note: print w/ replies, xml ) Need Help??


in reply to Re: Encapsulation through stringification - a variation on flyweight objects
in thread Encapsulation through stringification - a variation on flyweight objects

Ok. I'm missing something when it comes to encapsulation. Why on earth would you want to prevent Bar from accessing attributes it inherited from Foo? That's always been something I didn't understand in C++ - why private attributes were not inherited ...

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.


Comment on Re5: Encapsulation through stringification - a variation on flyweight objects
Re: Encapsulation through stringification - a variation on flyweight objects
by Abigail-II (Bishop) on Apr 02, 2003 at 16:34 UTC
    I don't know about your coding style, but I prefer to use namespaces and lexically scoped variables, to avoid ACCIDENTAL cluttering of values.

    But I concur. The entire concept of namespaces and lexical variables is just stupid. We should just put all our variables and subs in the main namespace.

    Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://247515]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-10-20 18:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (88 votes), past polls