News for hackers. Stuff that matters.
Re:I Want Off Mr. Golang's Wild Ride by whateveracct on Friday February 28, 2020 @01:16PM (#22444941)
Sorry I miswrote. I meant `type X Y` by "type alias" (terminology from other languages)

`type X Y` is still affected - you will 100% _not_ have more success :)

Proof (using JSON this time): https://play.golang.org/p/erfcSIe-Z7b

Re:I Want Off Mr. Golang's Wild Ride by masklinn on Friday February 28, 2020 @02:02PM (#22445334)
> `type X Y` is still affected - you will 100% _not_ have more success :)

type X Y neither inherits methods nor forwards anything (what struct embedding does), so you need to know about the protocol (which you're not told because it decides to just encode the bytes), and then you need to implement its methods on the newtype explicitly forwarding them to the underlying one.

TBF this is a pretty awful case as Go just goes and generates garbage without prompting.