Re: [go-nuts] Go channels overused and hyped?

2017-08-20 Thread Matt Harden
, rather than any other way. And I find > this somewhat wrong and certainly confusing. Am I really alone in this? > > John > > John Souvestre - New Orleans LA > > > -Original Message- > From: Ian Lance Taylor [mailto:i...@golang.org] > Sent: 2017 August 1

RE: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread John Souvestre
nfusing. Am I really alone in this? John John Souvestre - New Orleans LA -Original Message- From: Ian Lance Taylor [mailto:i...@golang.org] Sent: 2017 August 18, Fri 15:14 To: John Souvestre Cc: golang-nuts Subject: Re: [go-nuts] Go channels overused and hyped? On Fri, Aug 18, 20

Re: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread Ian Lance Taylor
On Fri, Aug 18, 2017 at 12:02 PM, John Souvestre wrote: > > I think that both of the suggestions below are great. But I’m left > wondering about the Go mantra > > > > Do not communicate by sharing memory. Instead, share memory by > communicating. > > > > What does it say? It starts off with

RE: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread John Souvestre
-nuts' Subject: RE: [go-nuts] Go channels overused and hyped? I think that both of the suggestions below are great. But I’m left wondering about the Go mantra Do not communicate by sharing memory. Instead, share memory by communicating. What does it say? It starts off with commun

RE: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread John Souvestre
Michael Jones Sent: 2017 August 18, Fri 08:57 To: Tamás Gulácsi Cc: golang-nuts Subject: Re: [go-nuts] Go channels overused and hyped? yes... everything is good for what it is designed for and less-good for what it is not designed for. mutex-protected counters are good channels for data

Re: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread Michael Jones
yes... everything is good for what it is designed for and less-good for what it is not designed for. mutex-protected counters are good channels for data communication are good neither is a perfect stand in for the other. nothin wrong with channels. On Fri, Aug 18, 2017 at 4:38 AM, Tamás Gulácsi

Re: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread Tamás Gulácsi
No. Use channels to coordinate and send data between goroutines, and other sync primitives to coordinate access to shared resources. Both has its pros and cons, use the best tool for the job. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To u

Re: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread snmed
Hi Michael Thank you very much for your very informative and elaborating post. I never had seen that blog this way, but your post has opened my eyes and now is clear that one should not compare apples with pears. So the tradeoff is, use concurrency in a safe manner or squezze the last drop perf

Re: [go-nuts] Go channels overused and hyped?

2017-08-12 Thread as
Thank you for writing this informative post. It and explains the issue well and should be shared with others with the same question. Honestly, Go has made me scared of locks. Every time I think of using one, I realize how bad the actual design of the program is and end up refactoring it. The en

Re: [go-nuts] Go channels overused and hyped?

2017-08-12 Thread Michael Jones
snmed, My disappointment with that blog post is that it does not address the larger issue, which some people here have clarified, but to be clear on the larger issue and the various points raised about channels: SMALL BENCHMARKS ARE HARD Benchmarking is harder than it seems, because computers si

Re: [go-nuts] Go channels overused and hyped?

2017-08-12 Thread Jesper Louis Andersen
On Fri, Aug 11, 2017 at 2:22 PM Chris Hopkins wrote: > The microsecond or so of cost you see I understood was *not* due to > there being thousands of operations needed to run the channel, but the > latency added by the stall, and scheduler overhead. > One particular case, which many benchma

Re: [go-nuts] Go channels overused and hyped?

2017-08-11 Thread Chris Hopkins
[sorry for the side question but:] When there is the "channels are expensive" consideration, I assume that is from a latency perspective rather than a throughput perspective. i.e. it was my understanding that channels had a small overhead on top of a basic lock, but otherwise added very little wo

Re: [go-nuts] Go channels overused and hyped?

2017-08-11 Thread Jesper Louis Andersen
On Tue, Aug 8, 2017 at 8:01 AM snmed wrote: > > I stumbled over a nice and very interesting Blog entry "Go channels are > bad and you should feel bad > " > , I would like to hear some opinions about that article >