Stroustrup's talk on C++0x

Brad Roberts braddr at puremagic.com
Sat Aug 25 16:15:41 PDT 2007


On Sat, 25 Aug 2007, Sean Kelly wrote:

> Walter Bright wrote:
> > Craig Black wrote:
> > > First, D needs to at the very least match the features that are added to
> > > C++ with regards to parallelism and concurrency.
> > 
> > D will be addressing the problem by moving towards supporting pure
> > functions, which are automatically parallelizable. I think this will be much
> > more powerful than C++'s model.
> > 
> > Also, D already implements a superset of some of C++0x's synchronization
> > primitives.
> 
> And with inline asm and volatile, an atomic operations package is fairly easy
> to implement in D (most easily for x86 for obvious reasons).  I really think D
> is in fairly good shape for concurrent programming even without a carefully
> established multithread-aware memory model.
> 
> 
> Sean

As long as you don't care about the performance of calling a function for 
a single asm operation or writing asm { ... } at each callsite for the 
atomic operations.  The problem is that dmd won't inline functions with 
inline asm.  GDC will, so all isn't lost.  Luckily, a future 2.0 feature, 
macros, will make it easy to shove the asm inline.  But yes, it's 
possible.  But it's no better than c++ on that front.. it's only on par.

Later,
Brad



More information about the Digitalmars-d mailing list