Ted Dunning wrote:
> On Fri, Apr 24, 2009 at 11:50 AM, John Bollinger <thinma...@yahoo.com>wrote:
>
> > Ted Dunning wrote:
> > > My view is that once it is immutable it is immutable.  Restoring
> > mutability
> > > is done by making a new copy [...].
> >
> > That position is stronger than you make it sound.  Changing a supposedly
> > immutable object so that it is mutable would itself be a mutation.  If it
> > were
> > possible then the object in question was never genuinely immutable in the
> > first place.
> >
> I agree, but that is a bit more of a philosophical answer.  I wanted to give
> an operational answer.

Yes and no.  I'm not trying to be nit picky, and I didn't explicitly say this 
in my
previous comment, but part of what I was thinking was that the sequence

foo.setMutable(true);
foo.setX(3.14159);

just as surely mutates "immutable" foo as it does mutable foo.


John



      

Reply via email to