4 ms·
I sincerely hope people don't start using just one of the color names at a time. If someone says to me, "That's a red function" I'm going to stop them every si
by wccrawford 6y ago
I sincerely hope people don't start using just one of the color names at a time. If someone says to me, "That's a red function" I'm going to stop them every single time and ask them which one was red again. It's much clearer and just as easy to say "that's an async function".
I think the post was great for making people think about this in an abstract way, but I don't think it was meant to reach beyond that mental exercise.
- ehnto 6y agoSo abstract that it took a few paragraphs for me to realize they were talking about a problem I'm intimately familiar with, and already have a pretty decent lexicon for.
- simiones 6y agoIs there an alternative word/concept to "function color" that covers not just sync/async, but also (C++-style) const/non-const functions for example?
- munificent 6y agoYes, that was a deliberate rhetorical trick. It's works for some audiences, but obviously not all of them. At the time I wrote the original article there were a lot of people really excited about the performance of async IO in Node (and JS in general) and were implicitly accepting the async programming style that went along with it. They liked the former so much that it muddled their perspective on the latter. Sort of like how when you go to a shitty diner after an amazing concert and recall the meal as amazing when really it's just because it got wrapped up in the emotional experience of the entire evening. I had many many discussions of people where I tried to talk about how the async programming model is really cumbersome and their response was "but it makes the app go faster!" We were talking at totally different levels. It can be really hard to get people to have a clear perspective on something they have an emotional attachment to. By making up a fake language and a made-up concept of function color, it let me show them "hey here's this thing that kind of sucks" without triggering their "but I love async IO in Node!" response. I had no idea the article would catch on like it did. Something I find interesting about it in retrospect is that because it is kind of strange and abstract, readers take very different things away from it while assuming their interpretation is exactly the one I had in mind. Some folks (like the author here) think it's about effects and static types (even though there is nothing about types at all in the article). Some think it's a love letter to Go (a language I'm not particularly enthused about in general). Really, I just wanted to talk about the unpleasant user experience of a certain programming style without getting hung up on what underlying behavior the style is attached to.
- ghoward 6y agoCan you put a link to your comment in your original blog post? I am really happy to hear from you what you meant, and adding that to the original might help the message. Also, I was one of the readers that managed to interpret your original basically the way you meant it. (One thing that helped is that I had previously read your criticisms of Go.) I am curious though: what do you think about structured concurrency? It was your post that made me search for a better solution than async/await, and I am of the opinion that structured concurrency might be better. Am I wrong?
- munificent 6y ago> Can you put a link to your comment in your original blog post? I could, but I'm never sure how much work I want to invest in maintaining and updating old content. I try to focus most of my (limited) time on making new stuff and, even though I'm generally a perfectionist, I think it's generally best to just keep moving forward. > I am curious though: what do you think about structured concurrency? I'm not familiar with it, sorry. My overall impression is that there is no silver bullet when it comes to concurrency. Humans aren't very good at thinking concurrently, so there's always some level of cognitive inpedence.
- OskarS 6y agoI don't see people using the specific colors very often, it's more like "that function is colored differently" or "this language doesn't have colored functions". When used like that, it's a really useful metaphor, it really clarifies what you mean.
- watwut 6y agoI have to say, I dont find it clarifying at all. More like hiding actual information behind term that does not even hint at what it could mean.
- rob74 6y ago@sync: #00f; @async: #f00;
- jhayward 6y agoI still have that reaction every time I hear someone refer to 'green threads'.