What Ian said, plus select is awkward to implement as a library, but works
quite well when its syntax is analogous to switch.

-rob


On Tue, Oct 18, 2016 at 11:41 AM, Ian Lance Taylor <i...@golang.org> wrote:

> On Tue, Oct 18, 2016 at 8:52 AM,  <gop...@gardener.com> wrote:
> > so why are channels and goroutines built into the language proper?
>
> Channels and goroutines are widely used.  Go does not follow a strict
> principle of putting everything in a library.  That said, ultimately
> these things boil down to matters of taste, in this case the taste of
> the original language designers.
>
> Ian
>
> > On Monday, October 17, 2016 at 9:42:17 AM UTC-4, adon...@google.com
> wrote:
> >>
> >> On Sunday, 16 October 2016 08:40:32 UTC-4, Sokolov Yura wrote:
> >>>
> >>> "future" is commonly used synchronization abstraction.
> >>>
> >>> It could be implemented in a library, using mutex, channel and
> interface.
> >>> Example:
> >>> https://github.com/Workiva/go-datastructures/blob/master/
> futures/selectable.go
> >>
> >>
> >> If it can be implemented as a library, why build it in to the language?
> >> You don't need futures very often---far less than, say, Mutex, and
> mutexes
> >> aren't built into the language either.
> >>
> > --
> > 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.
>
> --
> 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.
>

-- 
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.

Reply via email to