5 ms·
On a tangential note. > Async Ruby is colorless! I find it deeply irritating that this is how we choose to describe things these days. Rather than talking abo
by nixpulvis 5y ago
On a tangential note.
> Async Ruby is colorless!
I find it deeply irritating that this is how we choose to describe things these days. Rather than talking about modality, or even using a few more words to describe the actual differences in terms of the underlying programing language models.
Telling me that Ruby's async is colorless implies that I know about the description of programming models as "colors" of code, which was just some random analogy someone came up with which caught on. Nothing about this has anything to do with color. Even syntax highlighting doesn't really fit. This is akin to particle physicists getting cheeky and calling one of the quantum states "color" when it has nothing to do with wavelength (correct me if I'm wrong).
This is an appeal to stop trying to be so cute. Thank you.
- brunosutic 5y agoRed-black tree, a well-known algorithm also uses color references https://en.wikipedia.org/wiki/Red–black_tree https://en.wikipedia.org/wiki/Red–black_tree
- bradgessler 5y agoWhat 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".
- sanderjd 5y agoIt's jargon. This is an industry board. Jargon is par for the course.
- jazzyjackson 5y agoWhat do musical scales have to do with it? (Modality :P) "coloring" goes back before a few blog posts, it was probably popularized with programmers that keep up with crypto, as 'colored coins' are described in an influential paper right around the creation of Ethereum (Vitalik is one of the authors)[0], but I found some earlier references too, like coloring a complex plot to add a dimension [1], so carrying it over to computer programming, you have functions that have otherwise identical signature that you need to distinguish, so you make them different colors. [0] https://docs.google.com/a/buterin.com/document/d/1AnkP_cVZTCMLIzw4DvsW6M8Q2JC0lIzrTLuoWu2z1BE/edit# https://docs.google.com/a/buterin.com/document/d/1AnkP_cVZTC...! [1] https://en.wikipedia.org/wiki/Domain_coloring https://en.wikipedia.org/wiki/Domain_coloring
- tyrfing 5y agoColoured Petri Nets predate both and are relevant to crypto, I don't know enough to say if the idea was math/compsci jargon prior to that as well. https://en.wikipedia.org/wiki/Coloured_Petri_net https://en.wikipedia.org/wiki/Coloured_Petri_net
- jazzyjackson 5y agoThanks! Didn’t know about Petri nets, makes me wonder if this all didn’t start with Red/Black binary trees, so named because that’s the two colors of ink they had on hand, cited 1978: https://softwareengineering.stackexchange.com/questions/116614/where-does-the-term-red-black-tree-come-from https://softwareengineering.stackexchange.com/questions/1166...