4 ms·
> Then how is a syntactic construct like "await blocking_call()" inferior? It's inferior because you have to actually specify it whenever you make such a call,
by Blackthorn 6y ago
> Then how is a syntactic construct like "await blocking_call()" inferior?
It's inferior because you have to actually specify it whenever you make such a call, rather than having the runtime or library be smart and figure it out.
> And back to the original example, it's totally possible for a production implementation to handhold the user like this by, e.g. supplying a modified libc so that all the blocking system calls are linked against the runtime's implementation.
I know. I didn't say it was intractable. Just like problems 1-3, they all have potential solutions -- they just involve hard work.
- kccqzy 6y agoI see what you mean now. Omitting the keyword "await" is incredibly easy to do; simply do something different when the returned type is an awaitable. But the fact is that most languages haven't done this, and have you considered that perhaps language designers considered this issue and decided that explicit is better than implicit? And there are also a whole host of other issues too.