4 ms·
I struggle with this idea of "separate colors"... I see Promise returning functions as a super set of immediately returning functions... that is, any function t
by whoisthemachine 5y ago
I struggle with this idea of "separate colors"... I see Promise returning functions as a super set of immediately returning functions... that is, any function that can return immediately could also return as a Promise (which resolved immediately), so really, the immediately returning function is just an optimization to apply when it's helpful. I'm curious why a language suffers from this explicit separation of code which "returns immediately" versus code which "returns eventually"?