Live data from Hacker News

What color is your function? (2015)

journal.stuffwithstuff.com

1–10 of 63 posts

Re: What color is your function? (2015)

#4

All my functions ... every one I have ever written in my entire life: the color ass or doo doo brown.

Can you please not post like this to HN? We're trying for higher-quality discussion here, to the extent possible.

It's especially important not to post unsubstantive stuff to a fresh thread, because threads are super sensitive to initial conditions.

https://news.ycombinator.com/newsguidelines.html

Re: What color is your function? (2015)

#5
Previous related threads:

What Color Is Your Function? (2015) - https://news.ycombinator.com/item?id=23218782 - May 2020 (85 comments)

What Color is Your Function? (2015) - https://news.ycombinator.com/item?id=16732948 - April 2018 (45 comments)

What Color Is Your Function? - https://news.ycombinator.com/item?id=8984648 - Feb 2015 (143 comments)

What Color Is Your Function? - https://news.ycombinator.com/item?id=8982494 - Feb 2015 (3 comments)

Re: What color is your function? (2015)

#8
You can call an async from a non async function of course. You just can’t return it’s result synchronously.

Nitpick aside, I have got to the point where I care little! Every language has its boilerplatish things, be it Elm’s JSON parsing, GO’s “if (err != nil)” or Haskells myriad language extension declarations. I don’t think asyncs on a chain of functions, or converting a callback function into a promise based one is that bad.

Re: What color is your function? (2015)

#10

You can call an async from a non async function of course. You just can’t return it’s result synchronously. Nitpick aside, I have got to the point where I care little! Every language has its boilerplatish things, be it Elm’s JSON parsing, GO’s “if (err != nil)” or Haskells myriad language extension declarations. I don’t think asyncs on a chain of functions, or converting a callback function into a promise based one i…

The sticky part is when a callback returns a value and you can’t compute it without doing I/O.
Post reply on HN