On Tue, Jan 23, 2018 at 4:45 PM dc0d <kaveh.shahbaz...@gmail.com> wrote:

> In the sample you have provided, a send syntax is used. And considering
that, (IMHO) f1() must be evaluated first.

Consider f1() is a dispatcher. If it is to be evaluated first then it may
create and return a new channel that will not be used. Or consider if f1()
has a side effect of incrementing some send counter.

I don't think asking a function to return a channel to send a value to,
while possibly later figuring out there's nothing available to send, is a
good idea.



-- 

-j

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