Comment by flohofwoe
Comment by flohofwoe 20 hours ago
If calling the same function with a different argument would be considered 'function coloring', every function in a program is 'colored' and the word loses its meaning ;)
Zig actually also had solved the coloring problem in the old and abandondend async-await solution because the compiler simply stamped out a sync- or async-version of the same function based on the calling context (this works because everything is a single compilation unit).
In that case JS is not colored either because an async function is simply a normal function that returns a Promise.
As far as I understand, coloring refers to async and sync functions having the same calling syntax and interface, I.e.
share the same calling syntax. Whereas are different.If you have to call async functions with a different syntax or interface, then it's colored.