I'm wondering how is that possible that Clojure has implemented Software Transactional Memory and doesn't see any problem with that while Microsoft didn't finish its work for C# and noticed some problems which make it unpractical to implement STM described here: http://www.bluebytesoftware.com/blog/2010/01/03/ABriefRetrospectiveOnTransactionalMemory.aspx
Any idea please?
Clojure started on STM from nearly the beginning of the language which influenced the language design and how the language is used so as to make their STM practical. C# had to start with both an existing language and existing ways of using it which makes for a more difficult problem. The most seemingly important distinction is Clojure's STM starts with immutable data at the core of the language and then builds the concept of identity ontop of that and STM on top of the concept of identities. It's also worth noting that their are many different kinds of STM and clojure's STM is very different.
The there are many different approaches to STM. It's a very broad topic like "type systems": one approach can easily succeed while other approaches fail for various different reasons.
Clojure's STM has a few design decisions that make it IMHO more practical and effective than previous approaches:
ref
and similar). This makes it a much simpler and more focused design than many earlier STM approaches (this includes Microsoft's approach, at least as described in the above-linked article)As a result of these design decisions, Clojure's STM is a very different beast from previous STM approaches, and I think succeeds because of its novel design. The video below is a bit old but excellent if you want an overview of how it works:
http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With