|
|
|
|
|
by mumblemumble
2464 days ago
|
|
FWIW, adding async/await feels excusable to me. I was strongly resistant to it when it first came out in C# something like 10 years ago. I thought it was language cruft that was better handled with a library solution, and nothing more. I was convinced to give it a real try about 4 years ago, and had a serious change of heart after only a week or so. It was just syntactic sugar, but it was syntactic sugar that made concurrent code much easier to write. Not just in terms of making the code more verbose, but in terms of making it easier to do correctly. Because, at least in the way the C# team designed it, it subtly steers you towards doing things in smarter and safer ways, and away from the usual hot mess that is multithreading. I've heard similarly positive things about goroutines, which seem at first blush to be about the same thing. Given that Zig is ostensibly about helping people to write performant code more safely, that leaves me thinking that there's an argument to be made that async/await are a good fit for Zig's mission, and not just kitchen sink features. |
|