Hacker News new | past | comments | ask | show | jobs | submit login

I kind of wish the calling convention for async didn't have await at all. What if instead of a special syntax for waiting on an async function you instead had a special syntax for _not_ awaiting. If you want a copy of the future then there is an alternate syntax.

What I really want is for my synchronous and asynchronous code to be a lot more transparent and not force my hand depending on whether I'm calling from a synchronous or asynchronous context. I know this is a really difficult ask because of the lack of knowledge of what runtime to use when calling an async task in the context of a synchronous call...

Its the coloring problem I ultimately hate fighting against. There are definitely times that I care about it, long running blocking synchronous calls and getting a handle on a Future are really the only ones I can think of and they tend to be the exception not the norm.




Very fair, but if Rust gets a great effects system I think that'll be even better. Will take a while, though.




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

Search: