Message-Passing
Jonathan M Davis
jmdavisProg at gmx.com
Sun Jan 22 16:55:07 PST 2012
On Sunday, January 22, 2012 23:18:46 Manu wrote:
> On 22 January 2012 18:42, Sean Kelly <sean at invisibleduck.org> wrote:
> > The popularity of a language has no bearing on the quality of one of its
> > features. Are there other message passing schemes you prefer?
>
> As said in the original post, I think receiveOnly() is the most intuitive
> API. I just think that one should be named receive(), and perhaps receive()
> may be renamed receiveMulti(). Surely that would be more intuitive to more
> people?
I'm not sure that that's true. But since you have to read the docs before
using _any_ of it, I don't see it as an issue. You have to understand it
before you can use it, and if you understand it, what's it matter if it's
receiveOnly and receive instead of receiveOneOf and receive?
The problems with std.concurrency have not been its design but its lack of
documentation (which Sean has apparently improved - though I haven't looked at
it yet, so I can't comment), and the fact that it doesn't work correctly with
shared. It would be valuable to be able to say that you're _moving_ a value
across such that the current thread doesn't own it anymore, but that's really
a language issue, not an issue with std.concurrency.
The naming strikes me as bikeshedding. The names work as they are.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list