Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by goldsteinq

1 year ago

Go’s “red” is “function accepts cancellation context”.

2 comments

goldsteinq

Reply

sapiogram  1 year ago

Go's "red" is also "function may return an error"

  • goldsteinq  1 year ago

    Sure, but it’s a different effect. Go’s asynchronous “red” is either “accepts a cancellation context” or “accepts a output channel” (since goroutines can’t return values normally).

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities