2min chapter

Go Time: Golang, Software Engineering cover image

So do we like Generics or not?

Go Time: Golang, Software Engineering

CHAPTER

How to Improve Generic Type Inference

One thing that I am looking forward to in one one 21 is some improvements to generic type inference. So if you've got a function, a less generic, less function that automatically knows how to compare two comparable types, for example, and you pass that to something they expects another generic function, then you don't have to mention you don't need to instantiate it. It's infer from where you're assigning it to the type parameter for the function. That's pretty cool,. particularly in the context of things like slices, sort, funk, and that sort of thing. You just want to be like, I'd like all of these things to be garbage collected, but I still want

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode