Re: Please help me get rid of my mutable code.

2009-02-27 Thread CuppoJava
Thanks very much Itay, I'm reading through your post very carefully. I sounds like it's the answer to all my problems. -Patrick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: Please help me get rid of my mutable code.

2009-02-27 Thread Itay Maman
Hi, I just posted about the application context pattern. I believe it addresses the issue you're describing. -Itay On Feb 27, 4:21 am, CuppoJava wrote: > Hi, > After having used Clojure for a few months now, I'm still having lots > of trouble separating my mutable code from my immutable code.

Re: Please help me get rid of my mutable code.

2009-02-26 Thread Tom Ayerst
If most of the state is in the sprites and they don't co-ordinate then could you make the sprites agents and use watchers to manage their forward notifications. Any global state (the event loop) can be managed functionally by recursively passing the updated state as a parameter into the event funct

Please help me get rid of my mutable code.

2009-02-26 Thread CuppoJava
Hi, After having used Clojure for a few months now, I'm still having lots of trouble separating my mutable code from my immutable code. My use- case is pretty typical I think, so I'm wondering what sort of structure everyone else is using. Here's my current structure. I have an engine that manag