User loginNavigation |
archivesC++ FuturesThe next C++ standard is supposed to include futures in the libraries. Futures allow assignment to a value that is to be calculated at a later time - assigning a promise in lieu of the final value until such time as it becomes available. The current thread carries on until the value is actually needed, at which time the value is made available or a the thread goes into a wait state. Being a library facility, instead of a built-in language facility as in Oz or Alice-ML, the use of futures is not nearly as transparent. Still, one should be able to get a similar effect. In an article on Broken promises–C++0x futures, Bartosz Milewski criticizes the C++ implementation for it's lack of composability.
My personal opinion is that what he is really saying is that concurrency through futures (which in the simple case would be a declarative form of concurreny) don't easily do message-based concurrency. I suppose one could look at CTM and describe how to do Erlang type concurrency with nothing more than dataflow variables. But I think the bigger problem is that we assume that there is a single approach to solving the concurrency problem. We might as well say that STM is good, but it fails to deliver declarative or message concurrency. I personally think languages, either through libraries or built-in language facilities, should provide multiple ways of dealing with concurrency and distribution. Although I don't use C++ anymore, I'm glad that they are integrating lightweight concurrency models into the language. (Surprised we don't have a category dedicated to concurrency, so I'll post this under parallel/distributed.) By Chris Rathman at 2009-03-04 16:13 | Parallel/Distributed | 66 comments | other blogs | 39128 reads
Ensuring Correct-by-Construction Resource Usage by using Full-Spectrum Dependent TypesEnsuring Correct-by-Construction Resource Usage by using Full-Spectrum Dependent Types
More ammunition for the importance of embedded domain-specific languages, dependent types, and correctness-by-construction. By Paul Snively at 2009-03-04 17:17 | DSL | Functional | Implementation | Type Theory | 3 comments | other blogs | 7630 reads
|
Browse archivesActive forum topics |
Recent comments
22 weeks 2 days ago
22 weeks 3 days ago
22 weeks 3 days ago
44 weeks 4 days ago
48 weeks 6 days ago
50 weeks 3 days ago
50 weeks 3 days ago
1 year 1 week ago
1 year 5 weeks ago
1 year 5 weeks ago