On Fri, 20 Jan 2017 09:59:33 -0800 (PST) "John C." <jscrocket...@gmail.com> wrote:
> Thank you for the explanations. I also received a helpful note off > list, put here for posterity: >>> I suggest a thought experiment. You understand just fine how to >>> use the select statement, so maybe try to imagine how are you'd >>> code some task, where you use normally use select, _without_ it. >>> What'll be the [most important] difference? >> Aha, I have no way of finding out whether a channel is ready to >> proceed Note that another important property of the select statement is that it allows you to uniformly wait on several different channels at the same time. Again, as pointed out by other persons (and especially well put by J.L. Andersen -- as usually), everything the select statement can do could also been done using a library, but the resulting code looks ugly. If you had experience implementing, say, asynchronous I/O with timeouts using something like C or C++ or Delphi and the OS's native API for this, you would not actually ask your question: you'd know that (almost¹) everything Go built-in concurrency offers can be done using a more low-level language and the APIs provided by the underlying OS but this is a) way more work; b) the result looks way more ugly. ¹ http://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ -- 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.