
The bits of Go we avoid (and why) (Go Time #269)
Changelog Master Feed
00:00
How to Use New in Generic Code
The new keyword is the thing that makes things. How can you do without it? Well of course there are other formats like you use the structure name with the curly braces immediately after to instantiate it, usually taking a pointer sometimes at the start of that. And I like that pattern more because even if you're not setting any fields explicitly, it's the same as if you do. But also if it probably comes for me more down to writing maintainable things. It's always about being very explicit and clear so that when I come back later, I don't have to decode anything.
Transcript
Play full episode