3 ms·
> Wait. I thought lazy evaluation is defined as evaluation at the time a value is needed. Correct. You've got it right, GP comment has it wrong. Lazy does no
by Sohcahtoa82 4y ago
> Wait. I thought lazy evaluation is defined as evaluation at the time a value is needed.
Correct.
You've got it right, GP comment has it wrong.
Lazy does not simply mean "evaluated later". From what I understand, in JS, if you call an async function without `await`, it essentially gets added to a queue of functions to execute. Once the calling function stack completes, the async function will be executed.
A queue of functions to execute does not constitute "lazy evaluation" on its own.