Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Seeking inside-out object implementations

by herveus (Parson)
on Dec 08, 2005 at 15:57 UTC ( #515278=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Seeking inside-out object implementations
in thread Seeking inside-out object implementations

Howdy!

Perl programmers have come to expect to be able to get at the innards of objects easily -- that the internals are *not* encapsulated in any meaningful way. One can fairly argue that that creates a number of weaknesses and/or potentially fatal problems -- problems that would exist in some fashion any time an object is not opaque. Consider the risks one would take by making the attributes of a Jave class public.

Inside-out objects do encapsulate quite fiercely, and are very opaque. If one needs to serialize an opaque object, that object needs to provide that capability itself. One might expect a standard mechanism for doing that. "to_string" might be a suitable method name. I think PBP advocates creating just such a routine for this purpose.

It sort of comes down to "managing expectations", and, particularly, changing those expectations.

yours,
Michael


Comment on Re^4: Seeking inside-out object implementations

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2015-07-31 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls