Conversation

Often overlooked: Seamless FFI and "colorless" async programming are directly opposed. People often advocate the latter without realizing how much they benefit from the former. To name one example: OS mutexes don't know about your language runtime.
7
125
I'd be interested to understand where Zig is in this picture. As I understand it it has colourless async, but what is it lacking in FFI? I can imagine if you do stuff related to threads but you're an eventloop weirdness happens, but how does colourful async solve that?
1
If sync and async are separate you always know what mode you're in and the relationship your language threads have with OS threads, which gives you the information you need to uphold whatever invariants the FFI code you're calling requires.
1
1