# Generics Part 01: Basic Syntax

DevFeed: [Generics Part 01: Basic Syntax](<https://devfeed.tech/articles/generics-part-01-basic-syntax-22167.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2020/07/generics-01-basic-syntax.html>)

Published: 2020-07-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [examples](<https://devfeed.tech/tags/examples.md>), [generics](<https://devfeed.tech/tags/generics.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [programming](<https://devfeed.tech/tags/programming.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

## AI overview

This tutorial introduces the basic syntax of generics in Go. It explains a generic function through examples that print slices of different types and contrasts that approach with separate functions and empty-interface type assertions.

## Source excerpt

Changes The draft is a living document which means these posts will need to change over time. This section documents when changes have taken place to this post. 21/08/20 : Moving forward with the generics design draft Series Index Generics Part 01: Basic Syntax Generics Part 02: Underlying Types Generics Part 03: Struct Types and Data Semantics Introduction In this series of posts about generics in Go, I will present code and teach to the different aspects of the current generics draft. I will provide code links with the go2go playground so you can experiment with the different examples. The code samples will also be available in the Go training repo, but these examples are subject to change as I learn more or the draft changes.