Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Generics in Go

Gopher Academy via YouTube

Overview

Explore the concept of generics in Go through this 24-minute conference talk from GopherCon 2019. Dive into the advantages and requirements of implementing generics in the Go programming language. Learn how to reverse a slice of strings and discover sample functions and data structures that can be written generically. Gain insights into guidelines for designing with generics and understand how to reverse a slice of any type. Examine various contracts including Sequence, Stringer, and Ordered. Delve into generic binary tree data structures, learning how to create, search, and use them effectively. Conclude with a look at type checking implementation to experiment with these concepts.

Syllabus

Intro
Reverse a slice of string
Sample functions that can be written generically
Sample data structures that can be written generically
Guidelines for a generics design
Reverse a slice of any type
The Sequence contract
The Stringer contract
The Ordered contract
Generic binary tree data structures
Create a generic binary tree
Search a generic binary tree
Using a generic binary tree
Type checking implementation to try out

Taught by

Gopher Academy

Reviews

Start your review of Generics in Go

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.