Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's a good point. The same issue seems to exist with almost every JavaScript function interface. Whether or not a function is synchronous or asynchronous seems to be an implementation detail (at least in theory), but that fact must be exposed in the function interface.

I think the main issue is actually with language design. Callbacks and promises are not decent ways to handle asynchronity in my opinion. Perhaps it could be abstracted away in the language itself in a way that the function interface would be identical for both "sync" and async functions..



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: