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

I actually believe that code should be synchronous unless instructed to operate asynchronously - just my .02

Await should not be required - it should be more like...

--

regularWork(); //im waiting till this thing is done

driveHome();// not executed till thing one is done

background orderStatus = orderPizza();

turnOnXbox();

while(orderStatus == 'not ready') {

playXbox();

}

turnOffXbox();

eat();

--

Like I said - just my humble opinion that the code written would become more expressive.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: