News for hackers. Stuff that matters.
Re:Mistakes to Avoid If You Work with Scala Futures by goblin89 on Sunday February 21, 2021 @01:11AM (#26211245)
What would be the equivalent to “sending tasks” to a Future instead of awaiting result (re mistake 1) but in JS with Promises? Is it about operating on unresolved promises and awaiting final values as late as possible? Or does that part not apply to JS?
Re:Mistakes to Avoid If You Work with Scala Futures by danidiaz on Sunday February 21, 2021 @02:52AM (#26211699)
The error is explicitly awaiting for the result; "sending tasks" to the future is the correct way, and corresponds to "then" in Promise.