3 ms·
I haven’t run into interfaces coincidentally matching in Go. Have you? It might happen more easily for primitive types, though, and Go does have a way to declar
by skybrian 3y ago
I haven’t run into interfaces coincidentally matching in Go. Have you? It might happen more easily for primitive types, though, and Go does have a way to declare new types:
type UserId string
- klysm 3y agoAre these simple aliases or nominally distinct types?
- yencabulator 3y agoNominally distinct. https://go.dev/play/p/4am-a1i4_ox https://go.dev/play/p/4am-a1i4_ox