2013/4/2 larry google groups <lawrencecloj...@gmail.com>

> I might as well be writing PHP code.
>
> Does anyone actually write Clojure code like this, or is it considered bad
> form?
>

locals are not shared between threads (this is guaranteed) so immutability
is less important for them.
Transients were introduced in part for the same reason.

Values are still immutable, but "refs" in your case don't have any
concurrency semantics.
For locals, that's fine.

It's not a great style but if you occasionally do it in small functions,
it's not a big deal. Using
this style all the time will make your code easier to follow.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to