Thanks for the answers.
I realized the macro wasn't a good idea and I will keep using atoms to
manage state, just found the reset! function =)
Islon
On May 17, 10:28 am, Michael Gardner wrote:
> On May 15, 2010, at 4:56 PM, islon wrote:
>
> > I'm working in a simple single-thread console-based r
On May 15, 2010, at 4:56 PM, islon wrote:
> I'm working in a simple single-thread console-based rpg game in
> clojure (a port from my own scala version)
> and didn't want to use any concurrency structure because the game is
> single threaded.
> I was thinking about a macro like
>
> (defmacro set!
2010/5/15 islon :
> I'm working in a simple single-thread console-based rpg game in
> clojure (a port from my own scala version)
> and didn't want to use any concurrency structure because the game is
> single threaded.
> I was thinking about a macro like
>
> (defmacro set!! [s val]
> `(def ~s ~val
I'm working in a simple single-thread console-based rpg game in
clojure (a port from my own scala version)
and didn't want to use any concurrency structure because the game is
single threaded.
I was thinking about a macro like
(defmacro set!! [s val]
`(def ~s ~val))
so I can set my game state w