www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Re: [Article Context, First Draft] Concurrency, Parallelism and D

reply bearophile <bearophileHUGS lycos.com> writes:
dsimcha:

 Here's a first draft of an article on D's approaches to concurrency and 
 parallelism for D's article contest.  It's not an official submission 
 yet, but feedback would be appreciated.
 
 http://davesdprogramming.wordpress.com/2011/04/07/7/

I have given a first quick read to your article, later I will read it again better. Thank you for the article, that's also an explanation of your parallelism module.
Unless the type system becomes so complex that computer science Ph.Ds canít
wrap their heads around it or<

I am not sure of this.
It might generate random numbers from a thread-local random number generator
instance.<

This may help: http://d.puremagic.com/issues/show_bug.cgi?id=5249
It might really be pure but not marked as such because the discipline required
to recursively mark it and all functions it calls pure doesnít scale much
better than any other form of discipline in programming.<

If an important module of Phobos as yours doesn't want to or can't use one important feature of D2, like pure annotations, then it may mean the feature isn't well implemented yet, or the design of this part of D2 has failed. Bye, bearophile
Apr 12 2011
parent dsimcha <dsimcha yahoo.com> writes:
On 4/12/2011 12:51 PM, bearophile wrote:
 It might really be pure but not marked as such because the discipline required
to recursively mark it and all functions it calls pure doesnít scale much
better than any other form of discipline in programming.<

If an important module of Phobos as yours doesn't want to or can't use one important feature of D2, like pure annotations, then it may mean the feature isn't well implemented yet, or the design of this part of D2 has failed.

I kind of see your point, but as I note in the article I favored flexibility here. Even if pure worked well, there are occasionally good reasons to intentionally not use a pure function.
Apr 12 2011