It's no more mutable than a pure lambda calculus with lazy evaluation.
There is no _observable_ mutability. Anything else is an
implementation detail.

Single assignment comes from the tradition of logic programming and
concurrent process calculus rather than lambda calculus. A single
assignment variable is a lot like a pure promise. By pure I mean that
one cannot peek at the promise without blocking on it. This is
all-important in preventing race conditions in a concurrent setting.

If Sophie is interested, I used promises as single assignment
variables in the letrec implementation I posted.

It's fair to say that while Clojure supports single assignment
variables in the form of promises, they are not fundamental
language-level constructs the way they are in languages like Prolog or
Oz. You have to explicitly dereference them like any other IDeref.

-Per

On Tue, Apr 6, 2010 at 6:53 AM, Michael Gardner <gardne...@gmail.com> wrote:
> On Apr 5, 2010, at 4:34 PM, Sophie wrote:
>
>> But single-assignment is a quite valid (and more flexible?)  form of
>> immutability. I'm not convinced cycles are intrinsically tied to it in
>> any way.
>
> If you can assign to it, it's mutable. What you're talking about is creating 
> a mutable object, then making it immutable at some point (say, after it's 
> first assigned to). Immutable object cycles are indeed possible if one 
> permits this; Clojure doesn't, at least not for simple objects.
>
> -Michael
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to