On 3/16/07, Tom Pollard <tomp / earthlink.net> wrote:
>
> On Mar 16, 2007, at 12:06 PM, TRANS wrote:
> > Well it's not your most common pattern, clearly.
>
> Actually, I think it's probably fairly common.  As you agreed, it's
> the standard technique for implementing an immutable object.  I've
> certainly seen it used in Java and Python programming. (I've just
> never run across this name for it before seeing your module.)
>
> > And I have
> > seen it called the Immutable pattern too. But for the module it
> > doesn't make as much sense b/c the Multiton is not the only way to
> > achieve Immutability. The Singleton Pattern [is] an Immutable too.
>
> Singletons aren't immutable at all.  Singleton's have modifiable
> state; Immutables can't.

Boy, I'm all rim today. Yea, of course, you're right. They're only
immutable if there is no other state other than the initial arguments.
Immutable is a different pattern.

> I guess the right way to look at it is that
> Immutable and Singleton are distinct subtypes of Multiton.  And,
> therefore, you're right that Immutable wouldn't be an appropriate
> name for your mixin, since these objects could still have modifiable
> state, just not with respect to their constructor arguments.

Yep.

T.