Re: [go-nuts] Why not sync.Mutex is designed as an interface

2022-12-16 Thread 'Yuchen Xie' via golang-nuts
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 wrote: > > > > I checked with the issue about how to refer no-copy and the check of > cmd/vet. After checking, I'm curious that w

Re: [go-nuts] Why not sync.Mutex is designed as an interface

2022-11-08 Thread Ian Lance Taylor
On Tue, Nov 8, 2022 at 7:55 AM Xie Yuchen 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 val