[cap-talk] Singletons Considered Harmfuly
Raoul Duke
raould at gmail.com
Wed Mar 31 10:44:56 PDT 2010
On Wed, Mar 31, 2010 at 8:52 AM, David Wagner <daw at cs.berkeley.edu> wrote:
> I suspect this principle is uncontroversial: it comes naturally,
> and I would expect that any decent OO programmer is already following
> this principle. So I don't see any need to call it out specially or
> evangelize it. I can't recall seeing code that uses instance fields
> where a local variable would do the job, whereas use of singletons seems
> much more prevalent.
therein lies the rub: i've seen enough code to know that not all code
is "naturally" good.
More information about the cap-talk
mailing list