I have written a chapter for a book called "Beautiful code", edited by Greg Wilson. The chapter is a tutorial about Software Transactional Memory in Haskell. The book is aimed at a general audience of programmers, not Haskell geeks, so I have tried to explain everything necessary as I go along.
You can find the paper itself, and the code download here. This Wiki talk-page is a place to contribute any post-publication thoughts or observations about the paper, if you wish.
Simonpj 14:26, 22 December 2006 (UTC) To add a note, begin with four tilde signs ~~~~; the Wiki will fill in your user name and date.
Croach 17:10, 21 February 2007 (UTC)I just wanted to mention that it appears there is a small typo in the example code on page 2 of the paper. In the code you have a synchronized method called "withdraw" which you use again in the non-synchronized "deposit" method, only here you call the "withdraw" method "withdrawn". By the way, absolutely wonderful paper. I've been trying to learn everything I can about both Haskell and STM in the past few months and not only did this paper greatly increase my knowledge of STM, but it also helped increase my understanding of the basics of Haskell, which I already assumed I had a good grasp on. So, thank you for this work, it was an absolute joy to read.
CloudiDust 16:24, 25 February 2007 (UTC) Thanks very much for this wonderful paper! I'm gaining a lot from it now as both a newbie to Haskell and one to concurrency. Here are the typos I have found:
A. There is no "Int" but "int" in java. (I suppose they are java codes. :)
B. In the code at the beginning of Page 3, there seems to be a semicolon missing after "to.unlock()".
C. In the Footnote 2 in Page 5, the sentence "That’s because Haskell supports currying, which can you can ..." seems to duplicate a "can", and there seems to be a right parenthesis missing after "e.g. ".
I'm now busy translating this paper into Chinese, and will feedback as often as I can. I wonder whether I can put my translation on the net and if so which license could I use? Many thanks again!