5 ms·
Mixing sync and async conditinually at runtime means non-determinism and Zalgo is very real. There is no such thing as returning "sync object" vs an "async ob
by jschrf 4y ago
Mixing sync and async conditinually at runtime means non-determinism and Zalgo is very real.
There is no such thing as returning "sync object" vs an "async object" unless you mean you wish to check every single value in your app over and over again to see if its 'sync' or 'async'.
Promises are about control flow, not data. They are also just a stone on the path to full, proper async/await
- rektide 4y agoNone of these statements have evidence or cause to them & the concern seems overblown by far, if accepted dogma. It's mere oponion that promises are flow control, and I dont see why that opinion ought outweigh bith the obvious tautological truth that they are quite factually objects too in their own right. It seems a huge regression to me to decide, js is a language with dirst class everything, oh, except this thing is an object but actually we just want it to be flow control, so treat it otherwise & dont make use of the object-ness please. A sync vs async object is a thing without a .then vs a thing with a .then. With async/await, you dont have to check. Zalgos dead man, we should give up this fearmongering about demons.