On Nov 21, 10:58 am, Raoul Duke <
rao...@gmail.com> wrote:
> i wish there were the resources available on earth to somehow get the
> clojure stm working in/with/under cal (and scala ;-).
Hi Raoul,
I don't think that's too hard -- I have written my own STM for CAL,
and while I suspect that mine was not nearly as performant as
Clojure's, it seemed to be correct -- I implemented the Santa problem
from Beautiful Code and a bunch of other small programs. I hadn't come
across Clojure at the time, so I didn't try that 'ants' example. I
even persisted committed changes to TVars to a BDB database.
My algorithm had a higher isolation level and locked a lot more (only
one commit in progress at a time, for instance).
I've had a look at Clojure's STM, and it's pretty simple (except for
the bits I can't understand :-). Clojure of course has a richer/
different STM interface than Haskell -- with commutative operations
and actors, for instance. I think you could plug a hacked version of
Clojure's STM into CAL in a few days, ending up with Haskell-style
operations but Clojure's MVCC.
Doesn't Scala already have STM? How good is the implementation, and
how does it compare to Clojure and Haskell?
Tom