On Tuesday, September 5, 2017 at 11:04:52 PM UTC-4, Jesse McNelis wrote:
>
> On Wed, Sep 6, 2017 at 2:26 AM, T L <tapi...@gmail.com <javascript:>> 
> wrote: 
> > 
> > I mean it can be viewed as a bug for inconsistency. 
> > But from the memory model view, it can also not be viewed as a bug. 
> > 
>
> It's not a bug. The code is clearly expecting some ordering between 
> internal operations within two goroutines, this is an incorrect 
> expectation because Go doesn't provide that kind of ordering. 
>
> In the line: 
> c <- *p 
>
> p can be deferenced at any time before the send and the send only has 
> to happen before the receive. 
>

No disputes on this point.
It is just weird that the evaluation timing of *p is different to other 
expressions, such as, *p+0, *p*1, func()int{return *p}m etc.

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