My point is simply that whether something is immutable or not has nothing to
do with how that data structure is being used in the program.  Naming
conventions signify usage.  You could write a pure Java program and make it
pretty darn functional. You would still want to mark values that are
logically treated as constants as such.
And I don't things are not so different in Clojure. In many programs you
will create structures for the intention of changing them. This is I think
Rich's point about separating state and identity.  Yes data structures are
immutable, but vars help the programmer wrap their head around the
identities.

vars in Clojure are a tool for reasoning about a program that uses immutable
data structures.

And using a naming convention for vars that represent constants is yet
another tool for reasoning about the program.

On Sat, Feb 21, 2009 at 5:24 PM, Phil Hagelberg <p...@hagelb.org> wrote:

>
> David Nolen <dnolen.li...@gmail.com> writes:
>
> > The fact that the Clojure data structures are immutable and that some
> > of those data structures might be used logically constants are two
> > separate concerns.
>
> I don't understand what this means. What's the difference between using
> a value that doesn't change and using a value as a logical constant? Are
> you talking about changing the value of a var by calling "def" on it
> again instead of using "binding"?
>
> -Phil
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
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