[plt-scheme] Structure design, Immutable vs Mutable

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Sep 27 13:01:46 EDT 2007

On Sep 27, 2007, at 12:36 PM, Henk Boom wrote:

> I guess what I'm
> looking for is a way to "make a copy of body with the position field
> changed" which works even for structures extending body.

Amen! I have been programming around this for a while, and
Ryan has provided us with the tools to add this capability
to the class system. We should be able to program in an
applicative (more than normal) way soon.

I understand your diagnosis now.

>> Finally: I am also writing the second volume of HtDP (called How
>> to Design Classes) with this style. It turns out that in a CBPL
>> (aka OOPL) such an applicative (pure, functional) approach is
>> notationally even more economic than in a pure FPL.
> One of the sections I found somewhat lacking in HtDP was how to decide
> when to use immutable or mutable structures, I hope HtDC will talk
> more about that. =)

Me, too :-(

So for HtDP/2e these chapters will go away. And HtDC is taking
another stab at that issue. It's not easy. If you ever find a
good description, share!

-- Matthias

Posted on the users mailing list.