Concurrency architecture for D2

Walter Bright newshound1 at digitalmars.com
Fri Jan 8 14:06:35 PST 2010


retard wrote:
> My point was, what makes D community members more capable of reasoning 
> about these issues.

Nothing. What makes D special, though, is better language support for 
sound concurrent programming. But you'll still need a mental model of 
what's going on, just like you cannot program very successfully in C if 
you have no mental model of what a pointer is.

> I bet it's obvious to the top 30 C++ experts that 
> other kinds of concurrency models exist than multi-threaded shared memory 
> abstraction or SIMD. The problem isn't just about coming up with a model 
> -- if it helps you in any way, go ahead and browse old academic papers. 
> E.g. CSP was invented 32 years ago.
> 
> There are message passing libs for C++, too, for instance MPI. Making the 
> feature built-in doesn't automatically make creating concurrent 
> applications easier.

Yes it does. C++'s (and Java's, Scala's, and Go's) gaping problem is 
there's no way to ensure that you don't have implicit sharing going on. 
In D, such can be guaranteed.

> For instance message passing is harder to use than 
> implicit parallelism and auto-vectorization when doing parallel 
> processing in loops.

Sure. Except that implicit parallelism is inherently unsound unless the 
type system can support it.

I'll go further than that. Any language that supports implicit sharing 
of mutable data is inherently unsound for multithreaded programming.



More information about the Digitalmars-d mailing list