initial impressions/questions Matthew Flatt (21 Dec 2002 13:03 UTC)
Re: initial impressions/questions Marc Feeley (22 Dec 2002 02:09 UTC)
Re: initial impressions/questions Matthew Flatt (22 Dec 2002 06:10 UTC)
Re: initial impressions/questions Marc Feeley (23 Dec 2002 03:28 UTC)
Re: initial impressions/questions Matthew Flatt (23 Dec 2002 18:35 UTC)
Re: initial impressions/questions Marc Feeley (23 Dec 2002 19:12 UTC)

Re: initial impressions/questions Marc Feeley 23 Dec 2002 19:12 UTC

> At Sun, 22 Dec 2002 22:27:45 -0500, Marc Feeley wrote:
> > > I find this line of reasoning so compelling that I now advocate the
> > > elimination of `make-mutable-parameter'.
> >
> > You mean: parameters should be mutable according to the specified
> > semantics and "make-parameter" should create mutable parameter
> > objects, consequently "make-mutable-parameter" can be removed.
>
> No, I meant simply that `make-mutable-parameter' should be removed,
> with `make-parameter' left alone.
>
> So there would be no mutable parameters, because programmers can easily
> get them through mutable objects that are stored as parameter values.

But with that line of reasoning we should also eliminate mutable
lexical variables, because we can always bind them to a mutable
object.  This is beginning to sound a lot like ML's approach ("ref"
cells).

So for consistency with Scheme's current semantics, parameter objects
must be mutable.  If we were redesigning Scheme from scratch I would
be tempted to make a distinction between read-only and mutable
lexical variables, and dynamic variables.  There could be a form
to define each kind, i.e.

   (define variable value)                    ; variable is read-only
   (define-mutable variable value)            ; variable is mutable
   (make-parameter value [converter])         ; parameter is read-only
   (make-mutable-parameter value [converter]) ; parameter is mutable

Anyway, this is getting a bit far from SRFI 39.

Marc