|
|
|
|
|
by codethief
396 days ago
|
|
> would just multiply the number of function colors. Would there really be colors? I mean sure, the caller of an effectful function will either have to handle the effect or become effectful itself, so in this sense effectfulness is infectious. However, while a function might use the `await` effect, when calling the function you could also just define the effect handler so as to block, instead of defering the task and jumping back to the event loop. In other words, wouldn't this solve the issue of colors? One would simply define all possibly blocking functions as await-effectful. Whether or not they actually await / run asynchronously would be up to the caller. |
|
And everything working with generic function objects would have to lug around all these effects, unless the language has a very solid 'effect polymorphism' story.