On Jul 10, 10:28 pm, Stuart Halloway <[email protected]>
wrote:
> binding to a thread. The snake game could be extended to be a  
> simulation that runs on multiple threads (or perhaps even multiple  

Makes sense. For the example in the book it just seemed completely
redundant. And when writing Swing code, at least in Java you often
make use of the fact that everything is single-threaded, including all
events. Otherwise life would be hell.

In Clojure of course multi-threading is much easier, but I wonder
whether in most clojure Swing applications, I should use clojure's
transactions when only working on a single thread. Transactions do
involve some overhead, which is unnecessary in most (of my) Swing
applications. For cases where I have to leave the EDT, like blocking
io, I do take care of threading issues.

> You can rebind macros, but in order to use them you have to compile  
> some code again.

Recompiling would be fine in this case, but how can I rebind macros?
When doing a

(defmacro dosync [& body] ...)

it gives me this:

java.lang.Exception: Name conflict, can't def dosync because
namespace: user refers to:#'clojure.core/dosync (NO_SOURCE_FILE:8)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to