Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Date: Fri, 1 Aug 2008 13:17:26 +0900
- From: Curt Sampson <cjs@example.com>
- Subject: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- References: <20080729093315.GJ16234@lucky.cynic.net> <87myk0cyud.fsf@uwakimon.sk.tsukuba.ac.jp> <20080729233618.GE5154@lucky.cynic.net> <87d4kwch9b.fsf@uwakimon.sk.tsukuba.ac.jp> <20080730015628.GB27857@lucky.cynic.net> <878wvjdgk7.fsf@uwakimon.sk.tsukuba.ac.jp> <20080730113103.GE20935@lucky.cynic.net> <87wsj3atzl.fsf@uwakimon.sk.tsukuba.ac.jp> <20080731004528.GC15176@lucky.cynic.net> <87tze6psgd.fsf@uwakimon.sk.tsukuba.ac.jp>
- User-agent: Mutt/1.5.17 (2007-11-01)
On 2008-07-31 13:50 +0900 (Thu), Stephen J. Turnbull wrote: > Curt Sampson writes: > > > It's easy to reconstruct monadic behaviour in either language. It's just > > very difficult or impossible to type check it. > > Well, what I had in mind basically was creating closures as a type, > then "atomically" would be a type containing a list of closures. The > calling syntax would be something like > > Atomically(list_of_closures).exec() No, this doesn't appear to do it. Read section 3.2 of the Beautiful Concurrency paper carefully and note what's going on. The STM library is set up such that it's never possible to manipulate a TVar directly; it's possible only to generate an action (of type "STM a"). atomically takes an action (typically this will be the composition of several actions) and executes them atomically. Now how, in the system above, do you prevent Java code, inside or outside your list of closures, from manipulating the TVars themselves, rather than having only atomically able to execute these actions? The only way I can see is if the closures you're passing in are not arbitrary Java code, but are some sort of other language, or perhaps a very limited subset of Java code, either of which you need to compile and verify yourself. In other words, you effectivly have to write a new language to do this. > This would be a major PITA to code, and probably non-trivial to use, > it's not going to be a win in terms of convenience or transparency. There's that, too. That level of "can do it" is so far from "can do it conveniently" that it's probably closer to "can't do it at all," when it comes to writing real programs. cjs -- Curt Sampson <cjs@example.com> +81 90 7737 2974 Mobile sites and software consulting: http://www.starling-software.com
- Follow-Ups:
- Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: [tlug] anyone using haxe, nekovm, haxevideo?
- Next by Date: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Previous by thread: [tlug] anyone using haxe, nekovm, haxevideo?
- Next by thread: Re: [tlug] STM (was: Re: work times & accommodation @tokyo)
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links