3 ms·
I don't agree with the article that the idea of colored functions is tied to dynamic types. I think it applies equally well to Dart, TypeScript, C#, and any oth
by munificent 5y ago
I don't agree with the article that the idea of colored functions is tied to dynamic types. I think it applies equally well to Dart, TypeScript, C#, and any other language considering async await. It's mostly a question of usability and the ability to encapsulate use of asynchronous operations.
But for Rust, I think having colored functions is probably the right call. Asynchronous operations are fundamentally different at the OS/machine level. Since Rust is a language where code deliberately has very high affinity to what the underlying system is doing, it makes sense to make that distinction visible to users even if it means that it's harder to write and reuse asynchronous code.