That makes sense. Thanks for replying.
regards

On Wednesday, November 9, 2022 at 1:11:35 AM UTC+8 Ian Lance Taylor wrote:

> On Tue, Nov 8, 2022 at 7:55 AM Xie Yuchen <xieyu...@gmail.com> wrote:
> >
> > I checked with the issue about how to refer no-copy and the check of 
> cmd/vet. After checking, I'm curious that why not define mutex as an 
> interface, as interface always copy like a reference, which means users 
> don't worry to copy by value and cause an error.
> >
> > Design by the interface can always copy like a reference and no need to 
> mark it as cannot copy. However, we need to provide a default 
> implementation of the mutex and the construction of mutex is not short and 
> clean anymore.
> >
> > Would like to see how do you think about this confusion.
>
> That would mean that the zero value of sync.Mutex would not be usable.
>
> Ian
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/adffe982-b486-4187-9731-6147ec0bf436n%40googlegroups.com.

Reply via email to