5 ms·
What is “colorless” suppose to mean? This is the first time I’ve seen it used.
by bradgessler 5y ago
What is “colorless” suppose to mean? This is the first time I’ve seen it used.
- vmarquet 5y agoI think it's a reference to this blog post https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
- auno 5y agoWhich in turn is making a reference to an even older post at https://ansuz.sooke.bc.ca/entry/23 https://ansuz.sooke.bc.ca/entry/23.
- jsnell 5y agoContext: https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
- deleted 5y ago[deleted]
- justsomeuser 5y agoIt references the function return type: Colored = Promise<T> Colorless = T In "colorless" async/await, async functions are implicit (no async keyword), and when called, the compiler auto-unwraps the promise, so everything looks like "sync" code but any function stack could "save and resume" at an "async point".
- bradgessler 5y agoToo bad the Zeitgeist didn't land on "Typed" vs "Untyped".