Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: The Accessor Heresy

by Ovid (Cardinal)
on Nov 28, 2005 at 16:44 UTC ( [id://512265]=note: print w/replies, xml ) Need Help??


in reply to The Accessor Heresy

There are a few folks who argue that accessors are bad, objects shouldn't be glorified structs, multiple inheritance is always evil, etc. The main issue I have with statements such as these as they tend to be "holy pronouncements" that some folks take as gospel even though they're just good rules of thumb which should be violated as needed.

The primary benefit I see in considering such pronouncements is thinking about why they're beneficial, something you're doing. Accessors can violate encapsulation. Glorified structs are often overkill. Problems with MI are extremely well-documented. Once we understand why a particular practice is good or bad, then we're much better prepared to either adopt or reject a given practice for a given need. No blanket pronouncements for me!

Cheers,
Ovid

New address of my CGI Course.

Replies are listed 'Best First'.
Re^2: The Accessor Heresy
by merlyn (Sage) on Nov 28, 2005 at 18:47 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found