The Next Mainstream Programming Language: A Game Developer's Perspective :: Redux
Sean Kelly
sean at f4.ca
Sun Jul 15 01:22:45 PDT 2007
Craig Black wrote:
> I can see where you are coming from and appreciate your enthusiasm.
> However, I can also see Sean Cavanaugh's point about threading
> capabilities being overly complex. I can see that D is trying to
> address thread support using libraries. There are many classes in Tango
> that work toward this purpose. And they seem to be clean and capable,
> but IMO not a huge leap forward when compared to how threading is done
> in other modern languages.
Yup. I feel that these classes are building blocks for something more
comprehensive, rather than an end in themselves.
> The problem with threading is complexity. For example, there are many
> classes in Tango that accommodate concurrency: Thread, Atomic, Barrier,
> Condition, Mutex, ReadWriteMutex, Semaphore. To someone like myself,
> who is not exactly a concurrency expert, this can be quite
> overwhelming. How can we make it simpler for programmers? Perhaps is
> can't be simplified any further and the best we can do is documentation,
> tutorials, etc.
It can be simplified further, but tutorials help anyway. One idea would
be to perform in-process messaging with the clustering package. It's a
bit heavyweight compared to, say, DCSP, but I like that it largely
eliminates the differences between in-process and out-of-process
concurrency. Futures are another option, and they aren't terribly
difficult to implement.
> But I think there are ways to make it easier. I am a fan of the Concur
> project. I think at least some of the abstractions that Sutter and
> friends have identified can be implemented in D with libraries. Some
> may not be implementable with libraries, but may require support in the
> compiler. Whatever the case, I think D's compiler/standard libraries
> should be extended to deliver the features that Sutter is promoting.
You might want to look at Mikola Lysenko's DCSP:
http://www.assertfalse.com/projects.shtml
Concur is heavily based on Hoare's CSP model, so if you're familiar with
Concur then DCSP may not be too much of a stretch.
Sean
More information about the Digitalmars-d
mailing list