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

2017-08-20 Thread Matt Harden
re memory, 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

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

2017-08-18 Thread John Souvestre
ne 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, 2017 at 12:02 PM, John Souv

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?

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

2017-08-18 Thread John Souvestre
' 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 communicating

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

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

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

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

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

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

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

[go-nuts] Go channels overused and hyped?

2017-08-08 Thread Dave Cheney
Everyone overused channels and goroutines at first. Why wouldn't you? That's why you probably decided to try Go in the first place. I have a talk in Singapore a few months ago trying to explore this idea. It sort of went in a different direction, but the conclusion might be interesting for

[go-nuts] Go channels overused and hyped?

2017-08-08 Thread snmed
Hi Gophers 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 from seasoned go developers. Because I