I think you got it wrong. `select` is never about evaluating, but about blocking. It picks a case that is not blocked at the moment (or one of them, ramdomly) and a nil channel never block. It has nothing to do with any evaluation.
dc0d於 2017年12月31日星期日 UTC+8下午6時27分41秒寫道: > > Indeed. But case clauses of a select statement evaluate all expressions > even if the channel is nil, in which case it is ignored and it was expected > for other expressions to not get evaluated (which is not the case). > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.