I Believe Zig Has Function Colors
I wish we had more colors for functions. I don&#x27;t like the whole &quot;colorless functions&quot; idea. I want to, as a function, be able to constrain my caller. &quot;You can only call me in an async function&quot; is a cool thing to communicate. &quot;You can only call me if you can handle errors&quot;, &quot;you can only call me if you have read&#x2F;write access to the file system&quot;, etc - I want <i>arbitrary colors</i> for my functions, not colorless functions.<p>Not only does this mean that I can express arbitrary constraints on callers, it also means that all constraints and stateful expectations are explicit, verifiable, and clear to the reader.<p>The post is interesting because it highlights that, colorless or not, functions <i>have constraints</i> and you can try to hide them and handle things automatically, 
 via inference as is demonstrated here, but they&#x27;re always there. Async is probably one of the less interesting constraints, but I find it so much more confusing when languages have colorless functions... I can&#x27;t see suspension points, I can&#x27;t tell wtf is going on. It&#x27;s extremely frustrating.<p>&gt; However, before I continue, let me say a little bit of praise for Zig: this is innovation. This is a piece of good work that, most of the time, async functions can be called the same as normal functions.<p>It&#x27;s definitely <i>cool</i> and I like the definition of async they have. I think suspension is probably one of the less interesting things that a function can do, vs, say, IO, which is similarly &quot;colorless&quot; in languages. I just wish there were colors for all of these things.