Re:Async Ruby
by bradgessler on Saturday October 30, 2021 @05:12PM
(#29052333)
What is “colorless” suppose to mean? This is the first time I’ve seen it used.
[ Parent
| on HN ]
Re:Async Ruby
by justsomeuser on Saturday October 30, 2021 @08:56PM
(#29053583)
It 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".
Re:Async Ruby
by bradgessler on Tuesday November 09, 2021 @02:00PM
(#29165898)
Too bad the Zeitgeist didn't land on "Typed" vs "Untyped".
I think it's a reference to this blog post https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
Which in turn is making a reference to an even older post at https://ansuz.sooke.bc.ca/entry/23.