|
|
|
|
|
by didibus
224 days ago
|
|
> No hidden control flow. I've really been thinking about this one. I'm currently designing and implementing an async library and I've been wondering what's better, structured concurrency or explicit scopes. Explicit scopes allow you to see and think exactly how you want to relate every async task or not. But you have to pass it around, it's more verbose, and you can get mixed up in your scopes. Structured concurrency handles it automatically, the structure of the code is implicitly the scope of your tasks. Less verbose, can't forget about it, or get it mixed up, but it's magical, you might not even realize it's happening, and understanding mentally what the scope ends up being requires you to understand really well how the structured concurrency implicitly infers your scopes. I can't decide which is best. |
|