3 ms·
I agree, and that's okay, but the problem is that many people assume Zig is colorless. I just want to dispel that notion.
by ghoward 4y ago
I agree, and that's okay, but the problem is that many people assume Zig is colorless. I just want to dispel that notion.
- throwawaymaths 4y agoOnly by your definition. Colorless was always about DX, nowhere in the original article did anyone care about implementation. And this stuff does matter. I have created libraries which provides calls in both sync and async contexts to the same function and it works just fine.
- ghoward 4y agoDoes developer experience not include using function pointers in Zig?
- anonymoushn 4y agoHow is calling non-async functions via @asyncCall insufficient?
- ghoward 4y ago@asyncCall is exactly the sort of thing the original function colors calls out.
- throwawaymaths 4y agoActually, it's not... since you can use it on async and non async functions alike, which is what GP says. PLs with colored functions can't do the same thing at all, moreover the virality of @asynccall terminates at the point where you use it; if it were colored, the context of @asynccall would have to be async, and its parent and grandparent, etc.
- tiagod 4y agoAlright, and why should we care about it?