News for hackers. Stuff that matters.
Re:The Next Step for Generics by lentil on Wednesday June 17, 2020 @06:19AM (#23549780)
No, it's not an alias, they are distinct types. You can't use the types interchangeably (unless you cast them).

Your playground example didn't try to pass a UserID to a function accepting a PostID, but if you do that, you'll see the error:

https://play.golang.org/p/vyiJ_sLzy4O

There are no comments on this comment yet.