Zig NEWS

Discussion on: A simple async task library

Collapse
 
kristoff profile image
Loris Cro

Thank you for sharing!

Have you considered using Zig's async/await to implement your tasks? Admittedly there isn't a ton of information about it out there yet, but it seems that most of what you implemented in your Future abstraction can be offered out-of-the-box by async frames.

Or is there some specific reason why you wanted a different approach?

Collapse
 
jackji profile image
jack • Edited

Hi Loris, glad you like it. I've considered zig's async/await feature actually. But as you said, there isn't enough information about it yet. I think I'll give it a shot eventually!

EDIT: Another reason is I want to make code easy to understand. Async/await is cool, but they'll make code harder to reason about (a controversial topic).

Collapse
 
kristoff profile image
Loris Cro

Understood, makes sense, thanks for the clarification.