Hacker News new | ask | show | jobs
by mnarayan01 3046 days ago
> A C#-style cancellation token API, orthogonal to promises, is simple, easy to build, and easy to understand.

The problem is that promises were added to the language without any of that being hashed out. Now you may say "Having language-level support for promises is useful; cancellation tokens are more library details", and you'd have a point. The flip-side, however, is that e.g. the Fetch API is only now getting any sort of cancellation ability, and currently I believe it's limited to Firefox and Edge.

Which is not to say that I'm even confident that language support for Promises should have been held up. But I understand the complaints.