4 ms·
Right, colored functions are e.g. async or not async. In Zig, you can write a single function that works as both, which I assume is what multicolored means here
by wtetzner 3y ago
Right, colored functions are e.g. async or not async. In Zig, you can write a single function that works as both, which I assume is what multicolored means here.
- valenterry 3y agoThat doesn't seem to make any sense to me - it should be then called uncolored functions no? Because they all look the same. But maybe that's what they ment to say.
- kps 3y agoThey're generic over ‘color’ at compile time; the compiler generates code for normal and/or async contexts as necessary.
- valenterry 3y agoRight - so to the developer they all look the same, which means they are uncolored. If they are colored it means they look different (e.g. async vs sync).