On Wed, 02 May 2018 03:04:38 -0700 Lucio <lucio.d...@gmail.com> wrote: > > E.J. Dijkstra in "A Discipline of Programming" proposed multicase "do" and > "if" constructs; the former looping, the latter single-shot. The "guards" > he proposed were strictly boolean expressions determining which, if any, of > the guarded statements would be executed. If no guard proved true, the if > statement would fail (abort), the do statement would stop iterating. If > multiple guards proved true, one would be picked at random from the > succesful ones. > > I was very disappointed when Go stayed with the more conservative if and > for, although I could not make any proposal on how to implement Dijkstra's > ideas in a Go-like language. It's regrettable, in my opinion; I found the > proposed uniformity very appealing.
In Go select plays that role. Using guarded commands to replace switch or if would be rather expensive. Pragmatics matter. -- 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.