Hacker News new | ask | show | jobs
by nlitened 1261 days ago
If I understand your point correctly, you say that suspend keyword gives you a hint for which functions are long running, so that you run them in a background thread.

I think that’s a very flawed assumption. Some IO operations are pretty fast, like reading a local filesystem, and can be done in the UI thread, while some heavy non-async functions are accidentally O(n^2), and freeze your IO thread.

And if you say that “of course you should know what you’re doing”, then I think that suspend syntax just adds extra complexity without much semantic benefit.