Feedback on Átila's Vision for D
John Belmonte
john at neggie.net
Sun Oct 20 03:23:47 UTC 2019
On Saturday, 19 October 2019 at 20:22:21 UTC, Sebastiaan Koppe
wrote:
> https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
>
> Oh that is actually pretty nice. The nursery idea reminds me a
> bit of the coroutineScope in Kotlin. Makes a lot of sense.
Kotlin has a good structured concurrency implementation. Scopes
can be configured to use either a single OS thread (for UI, or
simply to make concurrency easier to reason about and avoid the
need for explicit locking and an entire class of race
conditions), or multiple OS threads with various mapping
strategies. It's also a good example of what minimum support is
needed from the language, vs. what can exist in the coroutine
library.
Interestingly, the team working on Kotlin's experimental
coroutine library stumbled on structured concurrency
independently. Martin Sústrik's defined it first (and made the
libdill C implementation), which Nathaniel Smith greatly expanded
on with his article and Python library. A great characteristic
of these people is that they want to work together to improve the
state of the art, and aren't competitive with respect to their
implementations
(https://trio.discourse.group/t/structured-concurrency-kickoff/).
Rust appears to be going down the wrong concurrency path.
Meanwhile C++ structured concurrency experiments have started
(https://github.com/lewissbaker/cppcoro/,
https://www.youtube.com/watch?v=1Wy5sq3s2rg). It's either an
opportunity for D, or a chance to fall behind...
The "founders" are very open to reviewing and consulting on
getting structured concurrency right in other languages. It
would just take some mutual openness by D's stewards to have an
honest look at where D is at and how it can move forward.
More information about the Digitalmars-d
mailing list