|laziness, impatience, and hubris|
Re: Object creationby rir (Vicar)
|on Jun 03, 2009 at 14:06 UTC||Need Help??|
If there is no state maintained in package variables, the motives to use an object are weakened. If you are maintaining state, you should do a bit of research on the singleton pattern.
Using an object allows an easier transition away from the singleton pattern if usage situations change.
The missteps that I've seen have involved not anticipating singleton breaking situations: adding extended info on objects by keying into another database, by industry standard codes, and by administrative matters where having the power of internal routines would have helped.
If in doubt, I'd present an object to client code just to stabilize the client interface.
Update: comma-fied list of "breaking situations"