Go 1.23: Custom Iterators Explained - Best feature?!

Published: 06 September 2024
on channel: Flo Woelki
5,090
194

Iterators in Go 1.23 can sometimes be confusing, but ultimately, they are absolutely amazing and will transform the Go library developer's life! If you are interested in how to boost your Go application's performance, feel free to check out this video:    • Boosting the performance by being uni...  


📝 Description
Discover the latest feature in Go 1.23 that's changing how we handle iterations: Custom Iterators! This video is tailored for developers eager to expand their toolkit with Go's new iteration capabilities. Here's what we'll cover:
• Understanding Range Iteration: Learn what range iteration means in Go and how it's traditionally used with slices and maps.
• Custom Iterators: Dive into how Go 1.23 allows you to create custom iterators for any data structure, not just the built-in types.
• Practical Examples: From simple to complex, see custom iterators in action. We'll create an iterator for a slice with transformation functions using the new iter package.
• Advanced Usage with iter.Seq and iter.Seq2: Explore how to handle single and dual value iterations with custom logic applied on the fly.
• Why Custom Iterators Matter: Understand the use cases where custom iterators can significantly enhance your code's readability and functionality, especially if you're into library development.


⏳ Timestamps:
00:00 - Introduction
00:28 - What are Range Iterators?
02:22 - Custom Iterator Simple Example
08:01 - Custom Iterator Map
15:00 - Iterator Seq2 Example
17:12 - Outro


👋 Hey there!
If you are new to this channel: Hey 👋 my name is Flo and I am a professional software engineer with a passion for coding in Golang, TypeScript, JavaScript, and Rust. This channel is where I share that passion and dive into the exciting world of software engineering. Plus, I love using emojis and paper-based animations (so have a look for that if you want to find my videos).


📨 Support and Connect!
Buy me a coffee: https://www.buymeacoffee.com/florianw...
Become a member.    / @flowoelki  
Discord:   / discord  
Instagram:   / flowydev  
LinkedIn:   / florian-woelki  
TikTok:   / florianwoelki  
GitHub: https://github.com/FlorianWoelki


📝 Copyright Notice
The original Go Gopher version is originally designed by Renée French (Source: https://go.dev/blog/gopher License details: https://creativecommons.org/licenses/.... The gopher used in the video and thumbnail is inspired by this author.


#golang #go #iterators #iter


Watch video Go 1.23: Custom Iterators Explained - Best feature?! online without registration, duration hours minute second in high quality. This video was added by user Flo Woelki 06 September 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,090 once and liked it 194 people.