News for hackers. Stuff that matters.
Re:Go channels are bad by r_sreeram on Wednesday March 02, 2016 @12:24PM (#11211375)
> N=1 was most common

Why would somebody use "select" for this at all? I.e., if you were going to write:

  select {
    case send/receive statement:
      statement
      ...
  }
Why not just write:

  send/receive statement
  statement
  ...
What am I missing?
Re:Go channels are bad by spenczar5 on Wednesday March 02, 2016 @12:30PM (#11211433)
I believe the GP was referring to select-with-one-case-and-a-default, like

  select {
    case <- ch:
    default:
  }
Re:Go channels are bad by jusssi on Wednesday March 02, 2016 @04:29PM (#11213162)
Channel send/recv is a blocking operation, select is a commonly used workaround to make it non-blocking.