On 10/21/17 11:52, bitwise wrote:
On Wednesday, 18 October 2017 at 08:56:21 UTC, Satoshi wrote:

async/await (vibe.d is nice but useless in comparison to C# or js
async/await idiom)


Reference counting when we cannot use GC...


If I understand correctly, both of these depend on implementation of
'scope' which is being worked on right now.

I think reference counting needs 'scope' to be made safe. RC also
benefits from scope in that many of the increments/decrements of the ref
count can be elided. The performance gain can be significant, and even
more so when you use atomic reference counting (like C++ shared_ptr) for
thread safety.

Async/Await needs to allocate state for the function's local variables.
When it's detected that the function's state/enumerator won't escape
it's current scope, it can be put on the stack, which is a pretty big
optimization.

I should also note that, RC has been formally acknowledged as a future
goal of D, but as far as I know, async/await has not.


Walter has stated numerous times both here and at conferences that Async/Await is definitely a goal. However, it's not as high a priority as the @safe/@nogc work so it hasn't made it to any official vision statement. Also I just talked to him offline about it, and he would need some serious help with it. He doesn't know how to do the compiler rewrite, and there a number of tricky situations one has to deal with. As much as I like Async/Await, I agree that the current plan has higher priority.

I'll probably start poking around Async/Await when I can clear the decks a bit of paid work. But that could be a while. :(

--
Adam Wilson
IRC: LightBender
import quiet.dlang.dev;

Reply via email to