4 ms·
No in typed language, this is not a problem because the compiler will refuse to compile. For uni-typed languages async/await is not the right model imho.
by xfer 9y ago
No in typed language, this is not a problem because the compiler will refuse to compile. For uni-typed languages async/await is not the right model imho.
- Touche 9y agoAgain, this is unrelated to async/await. Normal functions might return a number or an object or undefined or whatever. Since JavaScript is a dynamic language it is unsafe to call a function without either 1) Trusting that the function returns what its API says it should return or 2) Checking the return type and acting appropriately. So, the grandparent's complaint is about JavaScript being a dynamic language, async/await doesn't fix this issue or make it any worse.
- singularity2001 9y agograndpa here. position accepted.