Hello louki. Can you give us a little example about what you mean. I don't really understand this sentence for me "don't share state to communicate, communicate to share state."
Thanks a lot for all your answears 2018-05-07 9:03 GMT+02:00 Louki Sumirniy <louki.sumirniy.stal...@gmail.com>: > To use callbacks in Go you must follow Functional Programming rules about > shared data. In simple terms, you cannot share data. You can pass pointers > to shared data structures, and likely will have to but as soon as you start > using also goroutines you will end up with race conditions. To solve this > problem the best way usually will be to create a collection of functions > that isolate this state data from callers and ensures that changes to it > are not clobbered by other threads. > > It is not outside the scope of Go idiom to use callbacks, as you may be > familiar with the laws of Go - don't share state to communicate, > communicate to share state. > > On Saturday, 5 May 2018 03:53:13 UTC+3, Eduardo Moseis Fuentes wrote: >> >> HI everyone I´m Eduardo from Guatemala and I'm beginer. I'm interesting >> in all scope golang in fact I was download a little book about it, but I >> need learn more about callbacks because the book don´t has enough >> information on callbacks. May somebody tell me where can I find more >> information?. HELP ME PLEASE THANKS God Bless you >> > -- > 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. > -- - FLORENT GIRAUD - mail : *fgir...@student.42.fr <fgir...@student.42.fr>* - tel : *06.62.56.10.85* -- 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.