[squeak-dev] Re: immutibility

Randal L. Schwartz merlyn at stonehenge.com
Wed Mar 17 16:20:36 UTC 2010


>>>>> "Chris" == Chris Cunnington <smalltalktelevision at gmail.com> writes:

Chris> I'm going to disagree with you pretty hard about this.

I'm hoping your entire post is tongue in cheek.

Immutability solves a number of problems.  Just because you aren't
currently experiencing those problems doesn't mean others aren't.

The most important part is "how can I have an object that's guaranteed not to
change without being notified?", which is useful in *any* place where local
objects need to represent remote state.  Right now, that's being solved in
Squeak by having a second shadow copy of the object *every time*.  That's
expensive.  Take a look at how Magritte works.  Take a look at how Magma
works.  Take a look at how GLORP works.  I'm sure you don't see anything
tedious in *those*!

With immutable objects, you pay the price of a shadow copy only when
the thing actually changes!  Far better.

Seriously, I hope you're being naive (or a misplaced funny) rather than
serious. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion



More information about the Squeak-dev mailing list