←back to thread

97 points appliku | 1 comments | | HN request time: 0s | source
Show context
mrkeen ◴[] No.45158442[source]
> Solving the “what color is your function” problem.

Eh. I currently use monads for my effects, and am open to the idea of language-based effects.

But this isn't a solution to the colour problem - it is the colour problem. The compiler stops you accidentally calling red from blue. If you want to do it deliberately, you change the caller from blue to red.

replies(2): >>45158745 #>>45161717 #
1. epolanski ◴[] No.45158745[source]
This depends on the implementation. In effect typescript land, synchronous and asynchronous code is treated equally as soon as it's lifted in an effect.