From: Hal Fulton Date: 2005-05-10T07:56:11+09:00 Subject: Re: An idiom I like... modifiable defaults Glenn Parker wrote: > Hal Fulton wrote: > >> >> Sometimes objects are created with certain defaults. >> One way to override them is with default values in >> the constructor (and often corresponding writer methods). >> >> But sometimes I "don't like" the default and want to >> change it (for this program/session). >> >> Often I use class-level accessors for that purpose. > > > Not very thread-safe, at least not in your example's implementation. > No. I suppose if I were using this with threads I would wrap the thread-safety code around it rather than hiding it inside. Hal