Comment by cryptonector
Comment by cryptonector a day ago
> Well, you don't have async/sync/red/blue anymore, but you now have IO and non-IO functions.
> However, the coloring problem hasn't really been defeated.
Well, yes, but if the only way to do I/O were to have an Io instance to do it with then Io would infect all but pure(ish, non-Io) functions, so calling Io functions would be possible in all but those contexts where calling Io functions is explicitly something you don't want to be possible.
So in a way the color problem is lessened.
And on top of that you get something like Haskell's IO monad (ok, no monad, but an IO interface). Not too shabby, though you're right of course.
Next Zig will want monadic interfaces so that functions only have to have one special argument that can then be hidden.
Zig's not really about hiding things but you could put it in an options struct that has defaults unless overridden at compile time.