Chris
10/09/2020, 5:24 PMPromise
objects using a 3rd party library? Not the pre-baked ones offered in the N
libraries. Even if they run synchronously, there would be a ton of immediately reusable 3rd party libraries that would be useful. Just wondering what others have tried?stalbert
10/09/2020, 8:13 PMPromise
implementation any of those 3rd party libs rely on. I think I've done that a couple times to get libs working that used promises, even though I didn't need them.battk
10/09/2020, 8:51 PMstalbert
10/09/2020, 8:54 PMpromise
implementation @battk? And if not, how are Promises implemented server side in 2.1? just as short circuit to sync calls?battk
10/09/2020, 8:55 PMbattk
10/09/2020, 8:55 PMstalbert
10/09/2020, 8:56 PMbattk
10/09/2020, 8:56 PMbattk
10/09/2020, 8:57 PMbattk
10/09/2020, 8:58 PMstalbert
10/09/2020, 8:59 PMstalbert
10/09/2020, 9:00 PMbattk
10/09/2020, 9:01 PMbattk
10/09/2020, 9:02 PMstalbert
10/09/2020, 9:02 PMstalbert
10/09/2020, 9:03 PMsetTimeout()
battk
10/09/2020, 9:03 PMstalbert
10/09/2020, 9:06 PMstalbert
10/09/2020, 9:08 PMstalbert
10/09/2020, 9:09 PMstalbert
10/09/2020, 9:11 PMstalbert
10/09/2020, 9:13 PMstalbert
10/09/2020, 9:13 PMChris
10/09/2020, 9:19 PMChris
10/09/2020, 9:19 PMChris
10/09/2020, 9:21 PMpromise().then().catch()
as opposed to callbacks. Syntactically it's a win b/c of the readability gain.battk
10/09/2020, 9:22 PMChris
10/09/2020, 9:22 PMsetTimeout
. Which worked.battk
10/09/2020, 9:22 PMChris
10/09/2020, 9:23 PMChris
10/09/2020, 9:24 PMbattk
10/09/2020, 9:31 PMstalbert
10/10/2020, 1:47 AMstalbert
10/10/2020, 1:49 AMpromise().then().catch()
is less readable than plain old single thread sequential sync code. 🙂 but if the library forces either that or callback hell then I can't argue promises are better than that. If you're willing to do TypeScript you may even be able to get fancy with async
await