6 ms·
> Most in the tech world are now familiar with the post describing red/blue functions and their downsides, especially in the context of asynchrony. We are?
by quelltext 5y ago
> Most in the tech world are now familiar with the post describing red/blue functions and their downsides, especially in the context of asynchrony.
We are?
- ghengeveld 5y agoDespite being in the industry for a decade and authoring a library for async operations, I had never heard of this before.
- toopok4k3 5y agoWhat, you don't breathe this magical glitter dust in and out every day? I feel old reading these kind of blog posts that assume that we all know what the latest unicorn has been spewing out of its butt. It's like I'm missing out on the greatest debate. On dung. I'm sure it's valuable debate for those in the know. But this is just how it translates to some of us.
- coldtea 5y agoThis is not about some unicorn company, or some far-fetched concept. Async/await has been in the discussion for most popular languages (C# and JS first for the masses, Python, Rust, Java, and others) for a decade now. And the colored functions analogy was a very popular post (and was subsequently referenced and discussed in lots of others). Besides, HN is not some website about just knowing the core concepts used in the trade. There's Hacker Noon and others for that. HN has always been all about these kind of intra-group discussions.
- saurik 5y agoRight: there is a decade of discussion about this one narrow instantiation of a feature that is itself a mere part the past fifty years of discussion of the general class of thing it is from--coroutines--and an infinite amount of academic material on both that concept and monads--which is the correct mental abstraction to have here--and so the idea that I must have read this one random recent blog post (one which I honestly had heard about it in passing, but without any belief that it was important to anyone or that there was even one specific one that mattered) that was written by someone who probably, ironically, hasn't read all of those actually-seminal papers is more than a bit frustrating. (edit) Really, everyone should probably start by reading the 1978 papers "on the duality of operating system structures" and "communicating sequential processes", which, when combined with the appropriate background in the continuation passing style compiler transform (which I am pretty sure was also developed around the same time) could have hopefully prevented Ryan Dahl from accidentally causing the callback-hell "dark age" of software engineering from ever happening in the first place ;P. https://cs.oberlin.edu/~ctaylor/classes/341F2012/lauer78.pdf https://cs.oberlin.edu/~ctaylor/classes/341F2012/lauer78.pdf https://www.cs.cmu.edu/~crary/819-f09/Hoare78.pdf https://www.cs.cmu.edu/~crary/819-f09/Hoare78.pdf
- coldtea 5y ago>that was written by someone who probably, ironically, hasn't read all of those actually-seminal papers is more than a bit frustrating. For completeness and curiosity maybe. Otherwise one doesn't have to read the "actually-seminal papers" if they already know the concepts from the 40 to 20+ years that followed. Do physicists need to read the original Einstein or Maxwell if they had read tomes of subsequent course and academic books on the subject, plus modern papers for the later developments? In any case, I'm pretty sure the author of that post [1] had read at least the CSP papers -- he works on the Dart language team, and has written Game Programming Patterns and Crafting Interpreters, both quite popular books, which have been discussed (as in first page) more than 3-4 times in HN in the past years. [1] https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/#:~:text=red%3B,call%20a%20red%20function%20with&text=blue%20after%20the%20parentheses%20or%20vice%20versa%E2%80%94it%20does%20something%20bad https://journal.stuffwithstuff.com/2015/02/01/what-color-is-....
- saurik 5y agoI would (and in fact kind of do) agree with you... but for the assumption that we have all read this one particular article; like, the premise here isn't that "this is the specific literature you must read", but "why assume I read that when there is so much less to have read? here is what I would have said you should have read, and I can't imagine you did!". I guess maybe the issue in your comment is that my complex sentence with "is more than a bit frustrating" was mis-parsed, as you left off the direct referent of it and then seem to be arguing back at me with the same point I was trying to make with some emphatic irony (I was really hoping to provide three papers all from 1978, but there wasn't a perfect one on continuations)... to re-architect the center a bit: > ...the idea that I must have read this one random recent blog post [--when I can't imagine this person has read the specific literature I think everyone should have read, as there was an infinite amount of it and a lot of it is equivalent to the rest: the only thing that makes this blog post exciting is almost certainly some kind of recency bias--] is more than a bit frustrating.
- OskarS 5y agoIf you're not, here's the link [0]. It's a pretty influential post, it's introduced whole new terminology of "colored functions" into tech jargon that's starting to become reasonably commonly used. You should familiarize yourself with it if you haven't already. The point the original post is making is that in languages that support asynchrony using callbacks, promises or async/await, they've split the language in two: the "synchronous" and "asynchronous" parts, and reconciling them is a pain. The only languages which avoids this split comfortably are Go and a few other more niche ones (notably BEAM languages like Erlang and Elixir). This post makes the counter-argument that it's actually a good thing that functions are "colored" differently, as synchronous and asynchronous functions have different execution models, and that should be reflected in the language. [0]: https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
- quelltext 5y agoSorry, I feel bad that you had to write this. It's of course on me to learn about the linked concepts if I want to follow the post. I was just put off from doing so because of the author's assumption that everyone in tech is on the same page when this isn't necessarily the case. Many or even most folks "in tech" give little thought to PL design, at least not in the way that would have them read that article, though influential it might have been to some folks in tech that are into these discussions 6 years ago.
- rocqua 5y agoYou should not at all feel bad! This way, others in a similar situation to you get to benefit from GP's explanation. Moreover, GP got to interact with others on this concept. I'd also wager it took less effort for GP to write this, and then for you to read it, than it would have taken you to do all of it yourself. Point being, your question led to a very useful answer, and you should be proud, not sorry.
- TeMPOraL 5y agoI for once read that article twice already (once a few years ago, second time today), and I still gained by reading GGP's comment - reading someone else's summary of a topic is a way of quickly validating your own understanding.
- deleted 5y ago[deleted]
- rollulus 5y agoThat sentence triggered my impostor syndrome symptoms, which I felt I was getting under control lately.
- marton78 5y agoThere! An impostor! Seize him!
- brailsafe 5y agoHad the same thought. I've never heard the term coloured functions, and I was certainly browsing HN in 2015.
- agumonkey 5y agoI assumed you also knew COBOL Object standard and the difference between the first and second ADA proposals.