On Tue, Nov 8, 2022 at 7:55 AM Xie Yuchen <xieyusc...@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/CAOyqgcUsspZ%3DQo5HBsBh%3DKNXjmMt%3DWNjueHQD-MALHxrqS1vMQ%40mail.gmail.com.