News for hackers. Stuff that matters.
Re:Rust’s async isn’t colored by littlestymaar on Thursday March 11, 2021 @10:19AM (#26424909)
let f call g which calls h.

And suppose you replace h with an allocating function, then in Zig you have to manually add a allocator as a parameter in g and f and update their call site accordingly, because now they are also allocating.

And suppose you replace h with a function that returns an error, then in Go you have to manually add an error as a return value in g and f.

h become impure? Then g and f are not pure anymore either.

h becomes Windows specific, then g and f are Windows specific[1].

The situation is highly similar.

[1]: or you need to write a non-windows version of the work done by the h function, which fundamentally equivalent to calling block_on on an async function to make it a blocking one.

There are no comments on this comment yet.