Singleton pattern in D

BLS nanali at nospam-wanadoo.fr
Fri May 11 11:40:02 PDT 2007


Bill Baxter Wrote:

> David Ferenczi wrote:
> >> Final point: just make sure you actually need singleton.  I've seen a
> >> lot of people using singleton for a single class, which would be more
> >> efficiently handled by a static class.
> > 
> > Can you mention some godd and bad examples?
> > 
> > I use singleton pattern e.g. for the application class (command line
> > interface), configuration class (configuration handling), an log class
> > (logging).
> 
> Good ole Yegge comes through again here with another beautiful rant:
>    http://steve.yegge.googlepages.com/singleton-considered-stupid
HaHa, funny. <bg>
Seriously
RoR is based on patterns. MVC is a pattern. Signal-Slot is a pattern ...A Texteditor as GUI framework is implemented using patterns.

So I think patterns have nothing to do with nostalgic feelings. I think that implementing patterns using modern D features will  make patterns much more usefull in a "Good ol OOP" sense. Agreed ? 

Again just my opinion, Martin Fowlers Enterprise pattern have had an big impact in the db-developer scene.. 
 My 2 cents
Bjoern


More information about the Digitalmars-d-learn mailing list