Swift 5.5 including async/await.
C# Support it.
TypeScript support it.
Kotlin support it.
Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
September 24, 2021 Why not including async/await ? | ||||
---|---|---|---|---|
| ||||
September 24, 2021 Re: Why not including async/await ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to zoujiaqing | On Friday, 24 September 2021 at 03:16:36 UTC, zoujiaqing wrote: >Swift 5.5 including async/await. And Nim, and Rust, and Zig. I think of it as a lot like garbage collection:
Past the trivial client-side examples and synchronous callback hell, you start caring about the actual concurrent architecture of your program, but you no longer have any control to architect anything with. That's my limited experience, anyway. If you know of a good salespitch, "Erlang devs! Stop letting mailboxes hold you back! Join the new order!", I'll watch it. Meanwhile: https://code.dlang.org/packages/dawait That's using core.thread.fiber directly, but by removing that you could make it compatible with a simple |
September 24, 2021 Re: Why not including async/await ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to zoujiaqing | On Friday, 24 September 2021 at 03:16:36 UTC, zoujiaqing wrote: >Swift 5.5 including async/await. Python and C# went the generator => async route and if the compiler can automatically rewrite your code to state machines async becomes a runtime feature. That rewriting (ala C++ coroutines?) is the useful/enabling thing I'd see usefull for D. Would wonderfully interop with ranges as well. |
September 24, 2021 Re: Why not including async/await ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to jfondren | On Friday, 24 September 2021 at 06:00:30 UTC, jfondren wrote: >On Friday, 24 September 2021 at 03:16:36 UTC, zoujiaqing wrote: >Swift 5.5 including async/await. And Nim, and Rust, and Zig. I think of it as a lot like garbage collection:
Past the trivial client-side examples and synchronous callback hell, you start caring about the actual concurrent architecture of your program, but you no longer have any control to architect anything with. That's my limited experience, anyway. If you know of a good salespitch, "Erlang devs! Stop letting mailboxes hold you back! Join the new order!", I'll watch it. Meanwhile: https://code.dlang.org/packages/dawait That's using core.thread.fiber directly, but by removing that you could make it compatible with a simple adding vibe as dependency = make your project much much slower to compile dependencies are bad by design, you don't want to depend on 3rd party, you want use language to empower your project dependencies should serve to play nice with services, for ex: postgresql driver, gpu abstraction, aws api etc etc if people define language constructs as "dependencies", consuming them feels bad, because there will not be a common denominator between "dependencies" you'll end up like Rust, where certain io operation will require different paradigms because it is implemented as crate then you have crates that depends on crates that depends on crates etc you end up watching crates downloads for 5 minutes when you want to "try the language" same story for typescript and NPM, even though they have async support already, other aspects are affected Go doesn't have this problem, because goroutine is a language feature One must watch other languages and learn from their successes and avoid mistakes of others If your language can't do X, ask why it can't, if it could be doable with language, and then, and only then you can start to workaround the problem by consuming a dependency, but even then, one must always remember that it'll feel bad to depend on a dependency |
September 24, 2021 Re: Why not including async/await ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to russhy | On Friday, 24 September 2021 at 12:53:40 UTC, russhy wrote: >adding vibe as dependency = make your project much much slower to compile The X that I'd like is faster compilation of vibe and std.regex and such :) VibedScheduler is just a much better fiber scheduler than the deliberate placeholder implementation in Phobos. There's still language support, with |
September 24, 2021 Re: Why not including async/await ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to russhy | On Friday, 24 September 2021 at 12:53:40 UTC, russhy wrote: >if people define language constructs as "dependencies", consuming them feels bad, because there will not be a common denominator between "dependencies" It seems like this problem (dependencies leading to ecosystem fragmentation) could be solved by a good standard library module, without necessarily requiring a new language construct. |
September 24, 2021 Re: Why not including async/await ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul Backus | On Friday, 24 September 2021 at 15:30:19 UTC, Paul Backus wrote: >... Let's call it |