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

Agreed. Though, I think that in most contexts the compiler would probably be able to disambiguate which version is intended from type resolution. So maybe it would be better to be able to optionally specify whether we want the sync or async version, possibly overloading our usual polymorphic syntax, e.g.

  do_something().await;  // Its clear that we're using the async version
  do_something::<sync>();  // I really want the sync version, even in async contexts


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

Search: