[Prev][Next][Index][Thread]

Re: simple method dispatch question



At Fri, 10 Nov 2000 19:00:02 -0500 (EST), Barry Margolin <barmar@genuity.net> wrote:
> One of the other posters said that when he said "singleton" he wasn't
> talking about the Design Pattern with this name, and he thought it was
> unfortunate that Dylan used the same term.  But in fact, Dylan's singletons
> *are* the Singleton Design Pattern.  The difference is that they're built
> into the language, so you don't have to define classes to implement
> singletons.  And the explanation I gave above is the reason why the
> Singleton Design Pattern exists.

I disagree.  The Singleton Design Pattern is about providing an
encapsulated interface to some sort of global state.  Dylan
programmers usually do this using the module system; singleton types
generally don't enter into it.

Cheers,
-Peter S. Housel-  housel@acm.org  http://members.home.com/housel/


References: