Hi,
I really like the idea of grouping mutation in my programs into
transactions in order to reduce the number of possible states make
make reasoning about them easier (in the spirit of the mutable state
discussion of [1]) and thought that Clojure's dosync + refs might be
the ideal way to do
I would have hoped that changes to refs during an transaction wouldn't
affect the in-transaction value of the ref (that is, I would have
liked the code to print 1, then 2). This way, the view of the
program's state would always be guaranteed to be consistent, even
during a transaction, and
Am 23.09.2011 17:25, schrieb Stuart Halloway:
I would have hoped that changes to refs during an transaction wouldn't
affect the in-transaction value of the ref (that is, I would have
liked the code to print 1, then 2). This way, the view of the
program's state would always be guaranteed to be
Hi,
On Friday, September 23, 2011 5:25:34 PM UTC+2, stuart@gmail.com wrote:
I would have hoped that changes to refs during an transaction wouldn't
affect the in-transaction value of the ref
you usually don't want that. When you start working on more than one value
in a transaction (and