|
|
|
|
|
by derriz
206 days ago
|
|
> A function that doesn't take an Io argument but wants to call another function that requires an Io argument can't. Why? Can’t you just create an instance of an Io of whatever flavor you prefer and use that? Or keep one around for use repeatedly? The whole “hide a global event loop behind language syntax” is an example of a leaky abstraction which is also restrictive. The approach here is explicit and doesn’t bind functions to hidden global state. |
|
Scheduling of IO operations isn’t hidden global state. Or if it is, then so is thread scheduling by the OS.