Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] STM (was: Re: work times & accommodation @tokyo)



Curt Sampson writes:
 > On 2008-07-29 17:33 +0900 (Tue), Stephen J. Turnbull wrote:
 > 
 > > I don't see why the optimistic execution strategy described in
 > > Beautiful Code couldn't be used in Java....
 > 
 > It would work perfectly fine, and probably would not be all that hard to
 > implement. The same is true of many other languages.
 > 
 > The point is, the compiler's type checker in Java is not poweful enough
 > to tell you when you've used your library incorrectly,

That's a pretty strong assertion.  I assume that Java has some kind of
templating facility.  So all you need to do is define a TVar template
class that does not derive from the underlying class, but contains a
private (reference to an ?) instance of it.  For the locking, I guess
resource acquisition as initialization would be powerful enough.

Of course you still need to decide which variables need

 > and thus you're still open to the bugs that the Haskell compiler
 > will prevent you from inserting when you start combining smaller
 > operations.

I don't see how.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links