12 days ago · Tech · 0 comments

This course serves as an introduction to generics and iterators, two closely related features of the Go programming language. Generics hold the promise efficient and reusable data structures and functions without sacrificing correctness. As for iterators, which are built on generics, they promote flexibility and performance. Duration ¶ 2 days (14 hours) Prerequisites ¶ Fluency in English Experience with Go and a good understanding of functions, interfaces, and methods A basic knowledge of Git A personal computer (preferably running macOS or Linux) on which the following tools have been installed (ahead of the course): Go 1.26+ Visual Studio Code and its Go extension, or your preferred IDE or text editor Git A stable Internet connection Outline ¶ Day 1: Generics ¶ Preamble Generics (a.k.a. parametric polymorphism) Use cases for generics A brief history of the advent of generics in Go Type parameters Syntax Naming conventions Type arguments and instantiation Type inference Generic…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.