On Thu, Jan 8, 2009 at 12:05 PM, Tom Ayerst <tom.aye...@gmail.com> wrote: > The point, for me, is that Mark Engelberg's construct allowed the system to > work with no mutation and I don't think you can do it with Swing implemented > the way it is (your latest version puts the mutation in an atom).
Isn't a GUI by definition mutable state? Something is visible on the screen, and then you want to change that so something else is visible. There's really nothing Swing or any other GUI API could do to make that not true, is there? If not, then there's got to be some non-functional part of the app that pushes the current state out to the GUI. Given that, it may be cleanest to keep the latest version of the game state in some clojure-managed mutable reference, like an agent or ref. --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---