P.S.

 

And if you want to reduce it to a one-liner, how about this?

 

    Communicating is better than sharing sometimes, and vice versa.

 

John

    John Souvestre - New Orleans LA

 

From: John Souvestre [mailto:j...@souvestre.com] 
Sent: 2017 August 18, Fri 14:03
To: 'golang-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 communicating as the goal, but doesn’t 
tell you how to do it.  Then sharing memory is the goal and the solution it 
provides (communicating) is only right some of the time.

 

Am I missing something?  Should this be replaced?

 

John

    John Souvestre - New Orleans LA

 

From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On 
Behalf Of 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 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 <tgulacs...@gmail.com> wrote:

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 unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com 
<mailto:golang-nuts%2bunsubscr...@googlegroups.com> .
For more options, visit https://groups.google.com/d/optout.





 

-- 

Michael T. Jones
michael.jo...@gmail.com

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