345 private links
For instance, in Go, there is a context.Context value, which manages timeouts, cancellation, and a small amount of data that can be threaded through various functions. It is, by design, intended to be something passed through functions even if the receiver doesn’t use it directly but only passes it along.
Rust, Haskell, all programming languages I know have colored functions.
For a “normal” change, it only propagates to the caller. It may then chain to its caller. If it propagates all the way up to the top-level function, as demonstrated in the diagram, this may seem like a distinction without a difference.
I think with some current changes to Zig a function that does IO either is or is not a color depending on which Io value you pass to it, or perhaps rather, the color is an attribute of the Io value rather than the function itself.
Rust, Haskell and all programming languages supporting async. Async is assumed to be a color because it forces to change all functions using an async function.
a color must have this characteristic where it jumps over intervening calls and forces the change on all other functions within the relevant island of color.
See the related post https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/