You have to be prepared to deal with potential inconsistencies: a
closure (or any object) can hold a reference to the value of a
function.

(defn foo [x] (str x "v1"))
(def s (map foo [:a :b :c]))
(defn foo [x] (str x "v2"))
s ; (":av1" ":bv1" ":cv1")

Christophe

On Fri, Sep 4, 2009 at 10:22 AM, Krukow<karl.kru...@gmail.com> wrote:
>
> I was thinking about the capability of changing production systems on
> the fly. E.g. by having an accessible repl in a running production
> system.
>
> If you have a bug in a function, you can fix it by re-def'ing it -
> that is great. However, suppose you want to do a system upgrade where
> you want to change several things. Now you could just re-def each var
> one at a time, but this might produce an inconsistent program in the
> interval where you have re-def'ed some but not all vars.
>
> This first thing you would want is sort-of a atomic update of all
> vars, similarly to what is possible with refs. Is this possible
> somehow? If not are there any techniques or best practices for these
> "system upgrades"?
>
>
> /Karl
>
> >
>



-- 
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.blogspot.com/ (en)

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