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

> a solution to this problem

A solution is obvious – use await instead. Modern versions of the language even support async main function.



You are ignoring the problem, like the article does. await implies an asynchronous function, but impedance mismatch between two different domains may need that you execute an async-something within a sync-something-else.


in .NET, the problem with that impedance mismatch is IMO very minor. I’ve been programming C# for living for more than a decade, and I can’t remember a single case when I needed to block a current thread waiting for a task to complete.

Modern asp.net is designed in async-only way, no impedance mismatch there.

async void functions are compatible with non-async delegates. This solves impedance mismatch for GUI frameworks or other event-driven apps. Just don’t forget to catch and handle exceptions from the async code inside, also for GUI apps show users that background operation is ongoing.

The standard library exposes both flavours of APIs for files, sockets and many other built-in classes. You don’t have to use async APIs unless you want to.


I think you are confusing programming with developing software. Otherwise, we'll have just to agree to disagree.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: