News for hackers. Stuff that matters.
Re:Clojure: It’s About the Libraries by scott_s on Thursday April 30, 2009 @05:34PM (#587594)
Why do you say "don't bother trying to write it in C++" referring to Click's lock-free hash table? His algorithms are based on compare-and-swap, which is the same operation I'd use to implement a lock-free data structure in C/C++.
Re:Clojure: It’s About the Libraries by benreesman on Thursday April 30, 2009 @09:24PM (#587877)
The algorithm requires a fence too. I found remarks at one point by Cliff about why he couldn't do it in c++, if I find them again I will post them here.

edit: on iPhone so I can't post the link, but the comments section of cliff's blog has a discussion about java vs. C for this data structure. summary: maybe you could do it but it would be tricky and extremely non-portable, I.e. almost definitely not worth it. hope I didn't overstate, wasn't trying to dismissive (need to watch my language online).

Re:Clojure: It’s About the Libraries by scott_s on Thursday April 30, 2009 @11:09PM (#588013)
It is possible to make it portable, you just need a portable API for synchronization. That's not too hard to do - take a look at atomic operations in the Linux kernel.

Click was probably talking about the fact that Java has a consistent and defined memory model. C and C++ have no such memory model, but there always is one. It's just the memory model of the underlying architecture - which is sometimes extremely subtle.