Notes on structured concurrency, or: Go statement considered harmful
What.<p>This article proposes a &quot;nursery&quot;, which is just a wrapped sync.WaitGroup&#x2F;pthread_join&#x2F;futures::future::join_all&#x2F;a reactor that waits for all tasks to terminate&#x2F;etc.<p>It then uses an exception-like model for error propagation to &quot;solve&quot; error handling (which is fairly easy to handle with a channel).<p>The construct is a decently usable, already applied tool to handle a set of problems, but the article takes the issue way out of proportions and overhypes the proprosed solution. The &quot;with&quot; example for benefits to not having a &quot;go&quot; statement seem rather bogus, especially seeing that such RAII constructs do not exist in Go (no destructors, remember?).<p>Trying to claim that &quot;go&quot; is as terrible as the original &quot;goto&quot; is ignorance of the original problems. Bad use of goto can be a nightmare to track (as the author tried to illustrate), but goroutines do not jump around, they <i>branch</i> from the main goroutine, following normal control flow from there. They are easy to follow, and the language is designed so that you can throw around with them and forget them without them causing you problems.<p>Also, this article is comparing a list of concurrency constructs and one parallism construct (pthread_create—threading.Thread doesn&#x27;t count as parallism due to GIL) to <i>callbacks</i>, something which have nothing to do with concurrency <i>at all</i>. Very odd.