Hacker News new | ask | show | jobs
by MaxBarraclough 2016 days ago
Disagree, async (edit: in .Net at least) is pretty complex. For instance, from my experience it seems few C# programmers know that it's possible to deadlock if you get it wrong. [0][1] Plenty of people get confused with the basics, too. [2][3]

[0] https://blog.stephencleary.com/2012/07/dont-block-on-async-c...

[1] https://docs.microsoft.com/en-us/archive/msdn-magazine/2013/...

[2] https://stackoverflow.com/a/34681101/

[3] https://stackoverflow.com/a/34799307/

1 comments

Zig is not .net. async in zig is simple, you just need to understand a few things: what a frame is, what the difference is between a stack frame and a heap frame, what it means (at the machine level) to jump between frames, and the fact that you can't do it in c. That's it!

It really is just a control flow structure in zig (which is why it's a keyword)